notifyicon

Multiple notification icons appear when using multithreading

依然范特西╮ 提交于 2019-12-12 15:13:06
问题 Context: I'm working with a relatively simple winforms application, written in VB.NET on the .NET 3.5 framework in Visual Studio 2010. Issue: The FormLoad event creates two threads when the program is opened. One handles automatic update checking and the other performs a time consuming task syncing files with the internet. These threads are initialized as follows: Dim update_check_thread As New Threading.Thread(AddressOf auto_update_check) update_check_thread.IsBackground = True update_check

C# toggle window by clicking NotifyIcon (taskbar icon)

允我心安 提交于 2019-12-11 18:14:06
问题 My C# application consists of a taskbar icon (NotifyIcon) and an overhead window initially hidden. I want the user to be able to toggle the window visibility by clicking on the NotifyIcon (left, single click). Also the window is being hidden when loosing focus. This is what I have so far, a subclassed System.Windows.Forms.Form : Initialization: this.ControlBox = false; this.ShowIcon = false; this.ShowInTaskbar = false; // Instance variables: bool allowVisible; // System.Windows.Forms

Embed Icon in WPF application

試著忘記壹切 提交于 2019-12-11 07:23:33
问题 I am using an icon in my application in two situations. In XAML as an Image for the Button using DynamicResource. In C# as NotifyIcon this.notifyIcon.Icon = new SystemDrawing.Icon("..//..//Shutdown.ico" ); My problem is if I delete the image the application not working. How can I bind the image with the exe file so that the application can run only with the exe file? 回答1: Add the icon to the project as a Resource (not Embedded Resource, there is a difference), then access it with using(Stream

Get WPF ContextMenu to show on Winforms NotifyIcon

北城以北 提交于 2019-12-11 06:50:06
问题 I am using the Winforms NotifyIcon as there is no WPF Version, I am also using the ContextMenu tutorial here: http://www.wpftutorial.net/ContextMenu.html And I will be using the mouse placement code found in the answer here: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/8cdd4ef1-d31e-42ef-a30e-7b482c0fa163/ My main problem is, the method: private void OpenContextMenu(FrameworkElement element) { if( element.ContextMenu != null ) { element.ContextMenu.PlacementTarget = element;

How do I position a notification (tray) icon context menu on Windows XP?

删除回忆录丶 提交于 2019-12-11 04:46:58
问题 I'm using C++ and Win32. I want my context menu and settings dialog to show up near the tray icon. I think I need the icon's coordinates to do that. Shell_NotifyIconGetRect wasn't available until Windows 7. WM_CONTEXTMENU is available starting in Win2k, but only provides coordinates in wParam as of Vista (and when specifying NOTIFYICON_VERSION_4). 回答1: The correct way of solving this is to either use the mouse message coordinates, or GetMessagePos for other messages. 回答2: Retrieving the click

Disabling Alt-F4 on a Win Forms NotifyIcon

坚强是说给别人听的谎言 提交于 2019-12-11 01:48:37
问题 I am using a NotifyIcon from Win Forms to make a systray icon for my WPF C# application. I have a bug where if the user right clicks the icon for the context menu, they can press Alt-F4 and the icon will disappear from the tray, but the Main WPF application is still running. This is especially a problem when they have "minimized to systray" and the only control of the application is now gone. Anyone know how to handle this specificially on the systray? I've looked at the NotifyIcon

NotifyIcon Events not firing

浪尽此生 提交于 2019-12-10 15:34:17
问题 I'm new here and have a really mysterious problem to start off. I'm a software developer in the UK and have over 15 years of experience but have only been developing in .Net for 18 months. My NotifyIcon mouse events are not firing! I am using C# to write an application that starts as a NotifyIcon ('main app icon') and displays a ContextMenu on mouse right-click. This works fine: ContextMenu, forms launching and mouse click events firing. A tiny bit of background: the application is supposed

application won't start on startup after adding a notifyicon

懵懂的女人 提交于 2019-12-10 11:16:51
问题 my app was working ok and it would execute on startup before. I added a notify icon and in my code,there are some places that this icon changes.I added all required icons in the root folder of my app,and everything is working fine with the icons,except the startup boot of my app. I can see my app's address in the "run" part of the registry(I mean everything is the same as when my app booted at startup properly).but my app won't run at startup anymore. any advice on my matter? PS:I thought I

how to show Balloon tip like Windows 10 Balloon tip without stretching icon

独自空忆成欢 提交于 2019-12-09 09:35:51
问题 I have WPF desktop application which is pushing some notifications using: NotifyIcon.ShowBalloonTip(,,,ToolTipIcon.None) . The problem is: Windows 10 uses new "Windows 10 rectangle with image and text" style for Balloon notifications (I don't know how exactly it is called). If I use ToolTipIcon.None parameter, it gets my application icon which was set to NotifyIcon.Icon property and shows it in this Balloon notification. And this icon is blurred/stretched (like too small icon was taken and

How do I remove the “wrench” button on the balloon tooltip? [closed]

自作多情 提交于 2019-12-08 20:47:51
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I want to hide the wrench button on the balloon tooltip Does anyone know how? Is it possible to disable/remove the wrench button next