VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A Complete & Easy SysTray Dll

by Alan Toews (6 Submissions)
Category: Windows System Services
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (41 Votes)

This dll and test project allow you to easily place an icon in the system tray and set its tooltip. This dll provides MouseMove, MouseDown, MouseUp, Click, DoubleClick, Minimize, and Restore events, and allows you to easily minimize a form to the tray. You can also specify a popup menu, and how it responds. (eg: on right click,double click etc...)
I've added a new property (Persistent) which reloads the icon if Explorer crashes. Please let me know if you find any bugs with it.

Inputs
icon, tooltip, form and several response style settings.
Code Returns
events are raised on all mouse activity, and the mouse button used is returned in the event
Side Effects
Will cause an error on shutdown if Class_Terminate code is not allowed to run (IE: using End to stop your program)
API Declarations
'API declarations for setting the tray icon
Private Declare Function SetForegroundWindow _
Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function Shell_NotifyIcon _
Lib "shell32" Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
'API declarations for capturing mouse events in
'the tray icon
Private Declare Function CallWindowProc _
Lib "user32" Alias "CallWindowProcA" (ByVal _
lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal _
Msg As Long, ByVal wParam As Long, ByVal lParam _
As Long) As Long
Private Declare Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" (ByVal hwnd _
As Long, ByVal nIndex As Long, ByVal dwNewLong _
As Long) As Long

Rate A Complete & Easy SysTray Dll

Download A Complete & Easy SysTray Dll

Download A Complete & Easy SysTray Dll (12 KB)

A Complete & Easy SysTray Dll Comments

No comments have been posted about A Complete & Easy SysTray Dll. Why not be the first to post a comment about A Complete & Easy SysTray Dll.

Post your comment

Subject:
Message:
0/1000 characters