Alex Rivera | Logout

Single click to open menu for tray icon in C#

Asked 2009-05-07T14:18:41.183
9

How do i force a context menu for a tray icon to be shown when it is click rather than just right-clicked.

Ive tried using the MouseClick event, but the eventargs have the mouse position at x0y0.

Edit
Report

1 Answer

14

This should do it for you:

private void notifyIcon1_Click(object sender, EventArgs e)
        {
            contextMenuStrip1.Show(Cursor.Position.X, Cursor.Position.Y);
        }
answered 2009-05-07T14:57:48.343

Your Answer