Disabling Alt-F4 on a Win Forms NotifyIcon
- by Jippers
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.