Supprime de l'�cran une info-bulle affich�e
#include <GuiToolTip.au3>
_GUIToolTip_Pop ( $hWnd )
$hWnd | Handle du contr�le info-bulle (retourn� par _GUIToolTip_Create.) |
#include <GUIConstantsEx.au3> #include <GUIToolTip.au3> Example() Func Example() Local $hGUI = GUICreate(StringTrimRight(@ScriptName, StringLen(".exe")), 350, 200) Local $idButton = GUICtrlCreateButton(" Button ", 30, 32, 130, 28) ; Local $hButton = GUICtrlGetHandle($idButton) Local $hToolTip = _GUIToolTip_Create($hGUI, $TTS_BALLOON) Local $aPos = MouseGetPos() _GUIToolTip_AddTool($hToolTip, 0, " ", 0, 0, 0, 0, 0, 0) _GUIToolTip_SetTitle($hToolTip, 'Coordonn�es de la souris: ', $TTI_INFO) GUISetState(@SW_SHOW) ; Cherche la position de la souris pour l'utiliser comme point de d�part pour le tracking _GUIToolTip_TrackPosition($hToolTip, $aPos[0], $aPos[1]) _GUIToolTip_TrackActivate($hToolTip, True, 0, 0) Local $hTimer = TimerInit() Local $iMsg Do ; Obtient la position de la souris $aPos = MouseGetPos() ; Utilise la position de la souris pour d�finir la position de l'info-bulle _GUIToolTip_TrackPosition($hToolTip, $aPos[0], $aPos[1]) _GUIToolTip_UpdateTipText($hToolTip, 0, 0, "X: " & $aPos[0] & " Y: " & $aPos[1]) $iMsg = GUIGetMsg() If $iMsg <> $GUI_EVENT_CLOSE Then If $iMsg = $idButton Then ; ... EndIf ; 3 secondes apr�s le d�but, enl�ve l'�l�ment de l'affichage If TimerDiff($hTimer) >= 3000 Then _GUIToolTip_Pop($hToolTip) EndIf EndIf Until $iMsg = $GUI_EVENT_CLOSE ; D�truit le contr�le info-bulle _GUIToolTip_Destroy($hToolTip) GUIDelete($hGUI) EndFunc ;==>Example