Information générale
Catégorie:
Fonctions Windows API
Titre:
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)
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement