Function Reference


Gets the duration for the specified transition

#include <WinAPITheme.au3>
_WinAPI_GetThemeTransitionDuration ( $hTheme, $iPartID, $iStateIDFrom, $iStateIDTo, $iPropID )


$hTheme Handle of the theme data.
$iPartID ID of the part.
$iStateIDFrom The state ID of the part before the transition.
$iStateIDTo The state ID of the part after the transition.
$iPropID The property ID ($TMT_*).

Return Value

Success: The transition duration, in milliseconds.
Failure: Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.


This function requires Windows Vista or later.

See Also

Search GetThemeTransitionDuration in MSDN Library.


#include <APIThemeConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPISys.au3>
#include <WinAPITheme.au3>

Global Const $BP_PUSHBUTTON = 1
Global Const $PBS_NORMAL = 1
Global Const $PBS_HOT = 2

If Number(_WinAPI_GetVersion()) < 6.0 Then
    MsgBox(BitOR($MB_ICONERROR, $MB_SYSTEMMODAL), 'Error', 'Require Windows Vista or later.')

Local $hTheme = _WinAPI_OpenThemeData(0, 'Button')
Local $iVal = _WinAPI_GetThemeTransitionDuration($hTheme, $BP_PUSHBUTTON, $PBS_NORMAL, $PBS_HOT, $TMT_TRANSITIONDURATIONS)

ConsoleWrite('Transition from "Hot" to "Normal" state: ' & $iVal & ' ms' & @CRLF)