[RESOLVED] Notify Icon with right click menu.
I need to make a program that does not have any forms in it whatsoever, but does put a notify icon with a right click menu in the system tray. I've tried doing something like this:
VB Code:
Dim trayicon As New System.Windows.Forms.NotifyIcon
Dim icon As New Icon("C:\myicon.ico")
trayicon.Icon = icon
trayicon.Visible = True
But that doesn't work.
Even if I could create a notify icon I don't know how to add menu items to it that do anything.
If someone could post a sample of some code on how to do either of these things or point me to some place with an example, I'd appreciate it very much.
Re: [RESOLVED] Notify Icon with right click menu.
in Vb a Text box even change will give you access to the Event that you can Actually do this:
if e.keycode =keys.enter then ....
But, for a notify Icon, the event only has e.cancel.
How Would you get the Context menu to show, Only If the Shift key is pressed while you click the notify icon. I tried putting a Sub with that samillar handler as the textbox & it did nothing