Function Reference


_GUIToolTip_GetDelayTime

Retrieves the initial, pop-up or reshow durations of a ToolTip control

#include <GuiToolTip.au3>
_GUIToolTip_GetDelayTime ( $hWnd, $iDuration )

Parameters

$hWnd Handle to the ToolTip control (returned by _GUIToolTip_Create.)
$iDuration Flag that specifies which duration value will be retrieved:
    $TTDT_RESHOW (1) = Time it takes for subsequent ToolTip windows to appear as the pointer moves from one tool to another
    $TTDT_AUTOPOP (2) = Time the ToolTip window remains visible if the pointer is stationary within a tool's bounding rectangle
    $TTDT_INITIAL (3) = Time the pointer must remain stationary within a tool's bounding rectangle before the window appears

Return Value

Returns the specified duration, in milliseconds.

Related

_GUIToolTip_SetDelayTime

Example

#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        Local $hGUI = GUICreate("ToolTip Get/Set DelayTime (v" & @AutoItVersion & ")", 350, 200)

        Local $idButton = GUICtrlCreateButton("This is a button", 30, 32, 130, 28)
        Local $hButton = GUICtrlGetHandle($idButton)
        ; Create a tooltip control
        Local $hToolTip = _GUIToolTip_Create($hGUI)

        ; Add a tool to the tooltip control
        _GUIToolTip_AddTool($hToolTip, 0, "This is the ToolTip text", $hButton)

        ; set the time for how long the tooltip displays, to 1500 ms ($TTDT_AUTOPOP)
        _GUIToolTip_SetDelayTime($hToolTip, $TTDT_AUTOPOP, 1500)
        GUISetState(@SW_SHOW)

        ; Retrieve and display the time that the tooltip displays
        MsgBox($MB_SYSTEMMODAL, 'Message', 'Display time : ' & _GUIToolTip_GetDelayTime($hToolTip, $TTDT_AUTOPOP) & ' ms')

        While 1
                If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
        WEnd
        _GUIToolTip_Destroy($hToolTip)
        GUIDelete($hGUI)

EndFunc   ;==>Example