System Tray, Redux
How to properly display a pop-up menu from a system tray icon. Responds to mouse click without needing a callback procedure, plus allows keyboard focus from a pop-up menu.
Properly erases the menu when the user clicks somewhere other than the pop-up menu.
About this post
Posted: 2017-08-30
By: BlackBeltVB
Viewed: 396 times
Categories
Attachments
SYSTRAY2.ZIP
Posted: 9/1/2017 9:09:22 AM
Size: 4,003 bytes
Requirements
This code originally appeared on BlackBeltVB.com, and has been republished here with the permission of Matt Hart.
Special Instructions
Uses the following API functions:
- CallNextHookEx
- CopyMemory (RtlMoveMemory)
- GetWindowThreadProcessID
- Shell_NotifyIcon
- SetForegroundWindow
- SetWindowsHookEx
- UnHookWindowsHookEx
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.