Disabling Alt-F4 on a Win Forms NotifyIcon

Posted by Jippers on Stack Overflow See other posts from Stack Overflow or by Jippers
Published on 2010-06-17T16:13:03Z Indexed on 2010/06/17 16:23 UTC
Read the original article Hit count: 574

Filed under:
|
|

I am using a NotifyIcon from Win Forms to make a systray icon for my 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 documentation and there isn't anything relating to keypress events.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about notifyicon