# Function Reference

# _WinAPI_FlashWindow

Flashes the specified window one time

#include <WinAPISysWin.au3>
_WinAPI_FlashWindow ( $hWnd [, $bInvert = True] )

## Parameters

$hWnd | Handle to the window to be flashed. The window can be either open or minimized.
$bInvert | [optional] If True, the window is flashed from one state to the other. If False the window is returned to its original state. When an application is minimized and this parameter is True, the taskbar window button flashes active/inactive. If it is False, the taskbar window button flashes inactive, meaning that it does not change colors. It flashes as if it were being redrawn, but it does not provide the visual invert clue to the user.

## Return Value

Success: | True
Failure: | False

## Remarks

This function does not change the active state of the window.
To flash the window a specified number of times, use the FlashWindowEx function.

## Related

_WinAPI_FlashWindowEx

## See Also

Search FlashWindow in MSDN Library.

## Example

    #include <GUIConstantsEx.au3>
    #include <WinAPISysWin.au3>

    Example()

    Func Example()
        Local $hWnd, $iMsg, $idBtn_Flash
        $hWnd = GUICreate("_WinAPI_FlashWindow Example", 200, 200)
        $idBtn_Flash = GUICtrlCreateButton("Flash Window", 50, 85, 100, 30)
        GUISetState(@SW_SHOW)
        While 1
            $iMsg = GUIGetMsg()
            Select
                Case $iMsg = $GUI_EVENT_CLOSE
                    Exit
                Case $iMsg = $idBtn_Flash
                    GUISetState(@SW_MINIMIZE)
                    Sleep(1000)
                    _WinAPI_FlashWindow($hWnd)
                    Sleep(6000)
            EndSelect
        WEnd
    EndFunc   ;==>Example