I have a tray application and I would like to open the ContextMenuStrip if I click on the tray logo. This is my code:
private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
timeBroMenu.Show(Cursor.Position);
}
}
Double click is working easily.
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
{
timeBroMenu.Show(Cursor.Position);
}
Is there any way to make the left click work?
You don't need to handle the Click event if you have assigned the NotifyIcon's ContextMenuStrip Property.