Click or drag to resize
Xcalibur Systems LLC Logo

WindowHelperSetForegroundWindow Method

Brings the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.

SetForegroundWindow function


Namespace: Xcalibur.NativeMethods.V2.Windows
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("user32.dll")]
public static bool SetForegroundWindow(
	IntPtr windowHandle
)

Parameters

windowHandle  IntPtr
handle to the window that should be activated and brought to the foreground.

Return Value

Boolean
If the window was brought to the foreground, the return value is nonzero.
See Also