VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

TrayButton in TitleBar

Mick Doherty  (7 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This has kept me occupied for a couple weeks.
Most of what is in here I learned to use while writing it.
I think I have thought of everything, but maybe not.
The button draws itself in the correct system colours, it sizes and positions itself according to system settings.
I have noticed that the TrayMenu does not react properly in the development environment, it does behave itself once compiled though. Also, when compiled, the Tooltip does not work until after you have restored the App from the system tray, but it works ok in the development environment. I don't know why this is, maybe someone could explain it for me.

Side Effects
This project uses subclassing, so make sure you use the close button to stop the program in Development Environment.DO NOT PRESS STOP IN THE TOOLBAR! DO NOT TYPE END TO CLOSE THE PROGRAM.

API Declarations
AppendMenu
CallWindowProc
CreatePopupMenu
CreateWindowEx
DestroyMenu
DestroyWindow
DrawFrameControl
FillRect
GetAsyncKeyState
GetCursorPos
GetSysColorBrush
GetSystemMetrics
GetTitleBarInfo
GetWindowDC
PtInRect
Shell_NotifyIcon
SendMessage
SetWindowLong
SetWindowPos
TrackPopupMenu

Rate TrayButton in TitleBar (13(13 Vote))

Download TrayButton in TitleBar

TrayButton in TitleBar Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters