I am creating a System-Tray application. It was difficult to have an icon without a main form, but on previous topics in StackOverflow I worked it out. Right click works fine, I'm connected in the context menu, etc.
I am having problems left-clicking. As far as I can tell, the "notifyIcon1_Click" event doesn't fire at all.
private void notifyIcon1_Click(object sender, EventArgs e)
{
Debug.WriteLine("Does it work here?");
if (e.Equals(MouseButtons.Left))
{
Debug.WriteLine("It worked!");
}
}
None of these debugging lines are output, breakpoints in this event do not stop the program, etc.
Am I doing it wrong? What should be my next step? I am coding this in C # using Windows 7, if that matters at all for the behavior of the taskbar.
source
share