Change Notification Balloon Size - c#

I have here a windows forms application using NotifyIcon
Everything works perfectly fine in Win 7 environment, until Win10 came...
The content of my notification balloon has 9 lines.
But when I run my app in Win10, some lines of the notification content are not shown in the balloon.
How can I resize the balloon in Win10?
[Correct] Win 7 notification:
[Not Good] Meanwhile in Win 10:
[UPDATE] Notification balloon won't show in 64-bit os. 😴

I don't believe this is possible without hacking, but if you want to some examples on doing this are written here: http://www.codeproject.com/Articles/37912/Embedding-NET-Controls-to-NotifyIcon-Balloon-Toolt
I would advice you, if this is even possible, to move to WPF (or use a mix). For WPF there is a component which allows you to use custom popups. All the information on this can be found here: http://www.hardcodet.net/wpf-notifyicon

Related

How to disable touch scrolling in WinForms for Windows 10?

Years ago we have developed a WinForms application that was running with Windows 7, but should now run with Windows 10. This application is used on touch screens.
In Windows 7, the user could only scroll DataGridViews and other things using the scrollbar. Since this application is running with Windows 10, the user can also scroll these controls by swiping/dragging the control.
However, we don't want to change the behavior of this application now it is running with a newer Windows version, so we don't want to have this 'touch scrolling' functionality. Only the scrollbars may be used to scroll.
WPF has better touch support for these kind of things (PanningMode on ScrollViewers etc.), but unfortunately we can't migrate this application from WinForms to WPF.
So is there a way to disable this touch scrolling in code for WinForms? Or can it be disabled system wide with a Windows 10 setting or somewhere in the registry?
Thanks!
A colleague found a solution.
In the registry, find key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wisp\Touch\PanningDisabled and set it to 1. Without rebooting, swiping will be disabled.

C# Windows Universal 10 TopMost Window

I'm developing a Windows 10 Universal app (UWP).
Is it possible to set application as TopMost (always on top)? Like WPF or Winforms (TopMost property).
Thanks
A feature called CompactOverlay mode was added in the Creators Update that supports this type of functionality. When an app window enters compact overlay mode it’ll be shown above other windows so it won’t get blocked. This allows users to continue to keep an eye on your app's content even when they are working with something else. The canonical example of an app taking advantage of this feature is a media player or a video chat app.
A blog post describing the feature can be found here
https://blogs.msdn.microsoft.com/universal-windows-app-model/2017/02/11/compactoverlay-mode-aka-picture-in-picture/
Short answer is no, there is no way as of today to make the application modal.
There is a petition going around asking for this functionality, which was requested last December but given the amount of votes it got (35 at the time this answer was written), it doesn't look like it will be taken into consideration anytime soon.
As mentioned in the comments, this functionality would be PC only so even if it was added, my assumption would be that it wouldn't work outside of the PC mode (so no tablet, mobile or surface family device support).
It's not possible UWP apps have some restrictions compared with WPF of Win32 apps(classic apps).
With uwp apps you need enable some capabilities to do something special in your app as you can see in the link uwp apps need ask for permission or they can't access or modify files directly.
https://msdn.microsoft.com/en-us/library/windows/apps/mt270968.aspx
Best Regards

How to maximise a Windows 10 Universal Application's window to full screen when running on a desktop?

When building a universal application using Windows 10 (or Windows 8.1 WinRT), is it possible to force the application's main window to maximise on launch? This is obviously natural behaviour for the application when running on a mobile device but not when running on the desktop.
This is certainly possible using WinForms:
How do I make a WinForms app go Full Screen
How to display a Windows Form in full screen on top of the taskbar?
But I haven't so far managed to find anything in the Microsoft Documentation about this for Windows 10.
An app can request to start as full screen by setting the ApplicationView.PreferredLaunchWindowingMode to ApplicationViewWindowingMode.FullScreen
Roberth discussed this along with other view and window size issues in his Build session Navigation and Windowing in Universal Windows Apps

Windows Form Application Touch Gesture

We are developing a C#, .NET 4.5 application. On Windows 8.1, whenever a user does touch scrolling on one of the panels in the form, the entire screen application moves just a bit, even if maximized.
Found questions asked where people having similar issues fixed it in WPF by turning off the boundary feedback event, and people who fixed it in Windows 7 by just turning off boundary feedback for all of Windows. However, I can't find anything for disabling this in a standard C# windows form application, and the boundary feedback setting option doesn't seem to exist in the Windows 8 settings.
Any suggestions?
Thanks
I haven't tried this, but I believe you can override the WM_GESTURE message (specifically GID_PAN) and not send it on.
The default code is likely very similar to the example code in UpdatePanningFeedback .

WPF application that claims desktop real estate similar to windows taskbar

I'm building a WPF application that is designed to act as a notification toolbar for sending messages to users of an enterprise software platform. It's a bar that is a specific height, stretching all the way across the bottom of the user's desktop, sitting directly above the Windows taskbar.
What I'd like to do is to have my application "claim" or "reserve" the space it takes up and not allow any applications to load behind it. For example, if you were to resize your windows taskbar and make it larger, it will move icons and shortcuts, and maximizing windows will only use the desktop area that is not already being used by the taskbar.
Any idea how this could be pulled off? It's already set to be the topmost item on the desktop, so that's not my question. Right now if you opened another app and maximized it, then the bottom X pixels will be hidden behind my toolbar application.
(Note that I've added Windows 7 and Windows XP tags - I'd love to be able to implement this functionality on WinXP and up, but if I'm not able to do so on a particular version or versions, I can come up with a workaround)
These are called AppBars in Windows and you can use the SHAppBarMessage function to "dock" your window to a side of a monitor. Then other windows, when maximized, will not obscure the docked window.
Here's a link to a similar question that has more information, including a link to a CodeProject page that walks you through creating one.

Categories