Function Reference


_WinAPI_ShowWindow

Sets the specified window's show state

#include <WinAPISysWin.au3>
_WinAPI_ShowWindow ( $hWnd [, $iCmdShow = 5] )

Parameters

$hWnd Handle of window
$iCmdShow [optional] Specifies how the window is to be shown:
@SW_HIDE - Hides the window and activates another window
@SW_MAXIMIZE - Maximizes the specified window
@SW_MINIMIZE - Minimizes the specified window and activates the next top-level window in the Z order
@SW_RESTORE - Activates and displays the window
@SW_SHOW - Activates the window and displays it in its current size and position
@SW_SHOWDEFAULT - Sets the show state based on the SW_ flag specified in the STARTUPINFO structure
@SW_SHOWMAXIMIZED - Activates the window and displays it as a maximized window
@SW_SHOWMINIMIZED - Activates the window and displays it as a minimized window
@SW_SHOWMINNOACTIVE - Displays the window as a minimized window
@SW_SHOWNA - Displays the window in its current state
@SW_SHOWNOACTIVATE - Displays a window in its most recent size and position
@SW_SHOWNORMAL - Activates and displays a window

Return Value

Success: True
Failure: False

See Also

Search ShowWindow in MSDN Library.

Example

#include <WinAPISysWin.au3>

_Example()
Func _Example()
        Run("notepad.exe")
        Local $hWnd = WinWait("[CLASS:Notepad]", "")
        _WinAPI_ShowWindow($hWnd,@SW_HIDE)
        Sleep(1000)
        _WinAPI_ShowWindow($hWnd,@SW_SHOW)
EndFunc   ;==>_Example