[DllImport("user32.dll")]
static extern bool CloseWindow(IntPtr hWnd);
<DllImport("user32.dll", SetLastError:=True)> _
Private Shared Function CloseWindow(ByVal hWnd As IntPtr) As Integer
End Function
Private Declare Function CloseWindow Lib "user32" (ByVal Hwnd As IntPtr) As Boolean
None.
The CloseWindow function minimizes (but does not destroy) the specified window.
To destroy a window, an application must use the DestroyWindow function.
Please add some!
[Visual Basic.NET]
CloseWindow(Me.Handle)
[C#.NET]
CloseWindow(this.Handle);
You can use the WindowState property of the Form class and set this to FormWindowState.Minimized.