I haven't seen this mentioned on here so I thought I'd post it in case it was useful to anyone..
The code given elsewhere on this site for setting up a system tray icon uses a form menu for it's context menu when you right click on the icon. One problem can be that VB doesn't allow a form with a menu on it to be borderless.
The way I found around this is to have a second form which contains all the tray icon code. In the form load of Form1 you use Load Form2 to setup the tray icon and in the unload code of Form1 use Unload Form2 and then the code in the unload section of Form2 will take care of cleaning up after the tray icon.


Reply With Quote