I wanted a way to prevent a tooltip from timing out. When it times out, I can't get it back unless I restart the app. I was not able to find anything in this forum that worked the way I liked, so I came up with this. Maybe someone can use it.
Dick
#include <GUIConstantsEx.au3>
#include <GUIEdit.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
Dim $ID[1]
Local $Btn
Local $GUI
Local $dummyEdit
Local $Label_width = 200
Local $Target_label
$GUI = GUICreate("Balloon Tip Trick", 250, 150)
$Target_label = GUICtrlCreateLabel("Click OK to activate balloon tip", 20, 20, $Label_width, 25)
$OK_btn = GUICtrlCreateButton("OK", (250-50)/2, (150-80), 50, 25)
$Close_btn = GUICtrlCreateButton("Close", (250-50)/2, (150-50), 50, 25)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Close_btn
Exit
Case $OK_btn
$dummyEdit = GUICtrlCreateEdit("", 20, 35, $Label_width, 1)
GUICtrlSetData($Target_label, "Balloon tip active")
Case Else
;Get ID of cursor.
$ID = GUIGetCursorInfo()
;If ID[4] (the control ID) matches dummy control [AND optionally some control NOT empty], display balloon tip.
If $ID[4] = $dummyEdit And GUICtrlRead($Target_label) = "Balloon tip active" Then
_GUICtrlEdit_ShowBalloonTip($dummyEdit, "Balloon tip", "Here it is!", $TTI_INFO)
EndIf
ContinueLoop
EndSwitch
WEnd