|
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.WindowsAssembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax [DllImportAttribute("user32.dll")]
public static bool SetForegroundWindow(
IntPtr windowHandle
)
<DllImportAttribute("user32.dll">]
Public Shared Function SetForegroundWindow (
windowHandle As IntPtr
) As Boolean
public:
[DllImportAttribute(L"user32.dll")]
static bool SetForegroundWindow(
IntPtr windowHandle
)
[<DllImportAttribute("user32.dll")>]
static member SetForegroundWindow :
windowHandle : IntPtr -> bool
Parameters
- windowHandle IntPtr
- handle to the window that should be activated and brought to
the foreground.
Return Value
BooleanIf the window was brought to the foreground, the return value is nonzero.
See Also