I’m working on a client/server application that uses touch screens for user input. The app uses the NotifyIcon class to minimise the app to the tray when not required with a ContextMenuStrip to handle right click operations, herin lies the problem – touch screens are using touch, not mice to interface with the application hence you cannot right click!
Solution is the code below, it allows you to left click (or touch) the trayicon and still display the ContextMenu. What a PIA it was to find this!
private void notifyIcon1_MouseUp(object sender, MouseEventArgs e)
if (e.Button == MouseButtons.Left)
MethodInfo mi = typeof(NotifyIcon).GetMethod(“ShowContextMenu”, BindingFlags.Instance | BindingFlags.NonPublic);