3 out of 4 rated this helpful - Rate this topic

ShowWindowAsync function

Applies to: desktop apps only

Sets the show state of a window created by a different thread.

Syntax

BOOL WINAPI ShowWindowAsync(
  __in  HWND hWnd,
  __in  int nCmdShow
);

Parameters

hWnd [in]

Type: HWND

A handle to the window.

nCmdShow [in]

Type: int

Controls how the window is to be shown. For a list of possible values, see the description of the ShowWindow function.

Return value

Type:

Type: BOOL

If the window was previously visible, the return value is nonzero.

If the window was previously hidden, the return value is zero.

Remarks

This function posts a show-window event to the message queue of the given window. An application can use this function to avoid becoming nonresponsive while waiting for a nonresponsive application to finish processing a show-window event.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
ShowWindow
Conceptual
Windows

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
C# syntax
[DllImport("user32.dll")]
public static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow);
vb.net syntax
<DllImport("user32.dll", EntryPoint:="ShowWindowAsync")> Public Shared Function ShowWindowAsync(ByVal hWnd As IntPtr, ByVal cmdShow As Integer) As Boolean
End Function