Private Declare Function SetForegroundWindow Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Const SW_MAXIMIZE = 3
Const SW_MINIMIZE = 6
Private Sub Command1_Click()
Dim hWindow As Long
Dim lngResult As Long
Dim lngReturnValue As Long