SetActiveWindow (user32)
Last changed: -108.1.91.122

.
Summary

C# Signature:

[DllImport("user32.dll", SetLastError=true)]
public static extern IntPtr SetActiveWindow(IntPtr hWnd);

VB.NET Signature:

<DllImport("user32.dll", SetLastError:=true)> _
Private Shared Function SetActiveWindow(ByVal hWnd As IntPtr) As IntPtr
End Function

VB Signature:

Public Declare Function SetActiveWindow Lib "user32" _
         (ByVal hWnd As Long) As Long

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

[DllImport("user32.dll")]
static extern IntPtr SetActiveWindow(IntPtr hWnd);

public void MakeFormActive()
{
    SetActiveWindow(wndHandle);
}

Alternative Managed API:

Do you know one? Please contribute it!

Documentation