J'ai installé hier la Droopy lib, et j'ai pu m'amuser avec pas mal de truc sauf celui qui m'était le plus utile

Il suffit de mettre SysTrayIconBalloon en commentaire et tout marche

Ex : avec l'exemple de droopy

Que faire ?
Code : Tout sélectionner
Structure NOTIFYICONDATA_
cbSize.l
CompilerIf #PB_Compiler_Processor = #PB_Processor_x64
PB_Alignment1.b[4]
CompilerEndIf
hWnd.I
uId.l
uFlags.l
uCallbackMessage.l
CompilerIf #PB_Compiler_Processor = #PB_Processor_x64
PB_Alignment2.b[4]
CompilerEndIf
hIcon.I
StructureUnion
szTip.s{64}
szTipEx.s{128}
EndStructureUnion
dwState.l
dwStateMask.l
szInfo.s{256}
StructureUnion
uTimeout.l
uVersion.l
EndStructureUnion
szInfoTitle.s{64}
dwInfoFlags.l
guidItem.GUID
hBalloonIcon.I
EndStructure
Procedure SysTrayIconBalloon(uId, hWindow, Title$, message$, TimeOut, flags) ;+++
;/// Show a Systray Balloon
;/// Icon can be #NIIF_NONE #NIIF_INFO #NIIF_WARNING #NIIF_ERROR
Shared nId.NOTIFYICONDATA_
If OSVersion() >= #PB_OS_Windows_Vista
nId\cbSize = SizeOf(NOTIFYICONDATA_)
ElseIf OSVersion() >= #PB_OS_Windows_XP
nId\cbSize = #NOTIFYICONDATA_V3_SIZE
ElseIf OSVersion() >= #PB_OS_Windows_2000
nId\cbSize = #NOTIFYICONDATA_V2_SIZE
Else
nId\cbSize = #NOTIFYICONDATA_V1_SIZE
EndIf
If nId\cbSize
nId\uId = uId
nId\hWnd = hWindow
nId\szInfoTitle = Title$
nId\szInfo = message$
nId\uTimeout = TimeOut
nId\dwInfoFlags = flags
nId\uFlags = #NIF_INFO
nId\uVersion = #NOTIFYICON_VERSION+1
Shell_NotifyIcon_(#NIM_SETVERSION, @nId)
ProcedureReturn Shell_NotifyIcon_(#NIM_MODIFY, @nId)
EndIf
ProcedureReturn #False
EndProcedure
;&&&1 SysTrayIconBalloonHide
Procedure SysTrayIconBalloonHide() ;+++
;/// Hide the systray ballon
Shared nId.NOTIFYICONDATA_
PokeS(@nId\szInfo,"",0)
Shell_NotifyIcon_(#NIM_MODIFY, @nId)
EndProcedure
OpenWindow(0,#PB_Ignore,#PB_Ignore,200,50,"BalloonTip",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ButtonGadget(0,10,10,180,20,"SysTrayIconBalloon",#PB_Button_Toggle)
AddSysTrayIcon(0, WindowID(0), ExtractIcon_(0,"explorer.exe",3))
SetGadgetState(0,#False)
Repeat
evt=WaitWindowEvent()
If evt=#PB_Event_Gadget And EventGadget()=0 And EventType()=#PB_EventType_LeftClick
If GetGadgetState(0)=0
SysTrayIconBalloonHide()
Else
SysTrayIconBalloon(0, WindowID(0),"BalloonTip !","Icon "+Str(i),100,i)
i+1
If i=7 : i=0 : EndIf
EndIf
EndIf
Until evt=#PB_Event_CloseWindow
Comme cette fonction Windows ne fonctionne pas ou d'une manière aléatoire, on se fait souvent sa propre fenêtre de notification.SysTrayIconBalloon , qui affiche un ballon de notification au dessus d'une icone dans la zone systray...