VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Add your code to the system tray

Michael Barnathan  (11 Submissions)   Miscellaneous   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Ever wonder how all of those other software programs put themselves in the system tray(The start menu icon list at the bottom of the screen)? Well, this code, centered around traymodule.bas and written entirely by me, will do just that. Just use the RespondToTray(X) function in the Form_Mousemove event and call addtotray and removefrom tray when you want to add or remove your icon from the tray. You can customize tool-tips(The yellow labels), the icon appearing in the tray, and the form to have it respond to when you click the tray. You may use this module in any program you'd like, although if you're going to post a program using this on VBC, please give me credit for the module.

Side Effects
Make sure you remove the icon from the tray in the Form_Unload event, or it will stay there for about 30 seconds

Rate Add your code to the system tray (21(21 Vote))

Download Add your code to the system tray

Add your code to the system tray Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters