The ShowWindow function sets the specified window’s show state.
Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later
Identifies the window.
Specifies how the window is to be shown. This parameter is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values:
Hides the window and activates another window.
Maximizes the specified window.
Minimizes the specified window and activates the next top-level window in the Z order.
Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window.
Activates the window and displays it in its current size and position.
Sets the show state based on the SW_ flag specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application.
Activates the window and displays it as a maximized window.
Activates the window and displays it as a minimized window.
Displays the window as a minimized window. The active window remains active.
Displays the window in its current state. The active window remains active.
Displays a window in its most recent size and position. The active window remains active.
Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
If the window was previously visible, the return value is nonzero.
If the window was previously hidden, the return value is zero.