How To Use Icons with the Windows 95/98/Me Taskbar Notification Area (149276)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q149276 SUMMARY
The Windows API provides the ability to add, modify, and remove icons from
the System Tray, or Taskbar Notification Area, available in the Windows 95, Windows 98, Windows Me, Windows NT 4.0, and Windows 2000 shell. This
functionality can be provided using only the Shell_NotifyIcon function that
is exported by Shell32.dll. This API function also provides the ability to
specify a text string for the ToolTip that is displayed when a user pauses
with the mouse pointer over the icon. The step-by-step example in this
article creates a Visual Basic program which demonstrates how to use this
API function.
The ability to take some action if the icon in the Taskbar Notification Area is clicked depends on a callback function. Because Visual Basic 4.0 does not support callback functions directly, there is no way to show a form or execute some code using solely Visual Basic 4.0. This functionality was added in Visual Basic 5.0 (and later) with the addition of the AddressOf operator. A number of options are available to Visual Basic 4.0 developers that can provide callback functionality, including the Message Blaster OCX, the OCX mentioned in the Microsoft Systems Journal article noted in the "References" section of this article, or the Callback OLE server that is detailed in Bruce McKinney's book, Hardcore Visual Basic. For more information on any of these options, see the "References" section. Because these products do not include Visual Basic, Microsoft Product Support Services does not support their use.
REFERENCESHardcore Visual Basic, Bruce McKinney, Microsoft Press 1995.
Microsoft Win32 SDK, Shell_NotifyIcon and NOTIFYICONDATA.
Microsoft Systems Journal, February 1996, The Visual Programmer, page 93.
Visual Basic Programmer's Journal, March 1996, Q&A, page 136. For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
162613 How To Manipulate Icons in the System Tray with Visual Basic
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbAPI kbhowto KB149276 |
---|
|