You should be able to use the following code:
if (e.Button == MouseButtons.Left)
{
MethodInfo mi = typeof(NotifyIcon).GetMethod("ShowContextMenu",
BindingFlags.Instance |BindingFlags.NonPublic);
mi.Invoke(taskbarIcon, null);
}
Here is a good thread about the subject on MSDN.
source
share