by Martin Richardson (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (17 Votes)
A simple class to very easily minimize an application to, or to just create an icon in, the system tray. UPDATED & FIXED 6/25/1999 - Added new properties and fixed various things. If you have gotten this code before, please get it again (yes, it actually works now!). Read the comments for instructions.
Assumes
This code must go in a CLASS module. The Class module name must be "clsSysTray" for the sample code provided to work. This class instantiates an instance of the PictureBox control on the fly. VB 5 does not support this, so you have to add a picturebox to the form to minimize and call it "pichook" for this to work, as well as set the VB_VERSION constant in the code to be 5.
Code Returns
Nothing
Download clsSysTray.cls (13 KB)