General information
Category:
Windows API functions
Title:
Icon in the System Tray
I need some informations about how to show a application
icon in the System Tray.
With the following code I could put the icon in the system tray, but what I have to do to manipulate events (mouse move, click) on this icon?
Thank you for any information on this matter.
*************************************************
DECLARE INTEGER FindWindow IN WIN32API AS FindW STRING, STRING
apphandle = FindW(.null.,ThisForm.Caption) && get the form handle
DECLARE INTEGER Shell_NotifyIcon IN SHELL32 AS NotifyIcon INTEGER, STRING @NotifyData
oIcone = LOADPICTURE("o:\LIBRARY\BMP\FIELD.ICO")
ND_cbsize = LongToStr(84)
ND_hWnd = LongToStr(apphandle)
ND_uId = replic(Chr(0),4)
ND_Flags = LongToStr(2)
ND_uCallBackMessage = LongToStr(512)
ND_hIcon = LongToStr(oIcone.handle)
ND_szTip = "Exemplo teste "+replic(chr(0),50)
NotifyData = ND_cbsize+;
ND_hWnd+;
ND_uId+;
ND_Flags+;
ND_uCallBackMessage+;
ND_hIcon+;
ND_szTip
NotifyIcon(0,@NotifyData)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only