User32SwitchToThisWindow(IntPtr, Boolean) Method

Switches focus to the specified window and brings it to the foreground.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool SwitchToThisWindow(
	IntPtr hWnd,
	bool altTab
)

Parameters

hWnd  IntPtr
A handle to the window.
altTab  Boolean
A for this parameter indicates that the window is being switched to using the Alt+Tab key sequence.

This parameter should be otherwise.

Return Value

Boolean
If the the window is enabled, the return value is .

If the window is not enabled, the return value is .

Remarks

See Also