GetForegroundwindow
C# Signature:
/// <summary>
/// Retrieves a handle to the foreground window (the window with which the user is currently working). The system
/// assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.
/// <para>See https://msdn.microsoft.com/en-us/library/windows/desktop/ms633505%28v=vs.85%29.aspx for more information.</para>
/// </summary>
/// <returns>
/// C++ ( Type: Type: HWND )<br /> The return value is a handle to the foreground window. The foreground window
/// can be NULL in certain circumstances, such as when a window is losing activation.
/// </returns>
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();VB.NET Signature:
''' <summary>The GetForegroundWindow function returns a handle to the foreground window.</summary>
''' <returns>The return value is a handle to the foreground window. The foreground window can be NULL in certain circumstances, such as when a window is losing activation. </returns>
<DllImport("user32.dll", SetLastError:=True)> _
Private Shared Function GetForegroundWindow() As IntPtr
End FunctionVB.NET Signature Alternative
VB Signature:
F# Signature
Sample Code:
Última actualización