Using V6, I am trying to maximize a window that is in Isiconic state. The following code is what I'm trying to use. Any suggestions would be very appreciative.
thanks
barrywl
Public Declare Function ShowWindow& Lib "user32" (hwnd As Long, ByVal nCmdShow As Long)
Public Function SetWindowState(hwnd As Long) As Integer
Dim x As Integer
SW_HIDE = 0
SW_MAXIMIZE = 3
SW_MINIMIZE = 6
SW_RESTORE = 9
SW_SHOW = 5
SW_SHOWMAXIMIZED = 3
SW_SHOWMINIMIZED = 2
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_SHOWNOACTIVATE = 4
SW_SHOWNORMAL = 1
If IsIconic(hwnd) Then
x = ShowWindow(hwnd, SW_RESTORE)
x = ShowWindow(hwnd, SW_SHOWNORMAL)
x = SetForegroundWindow(hwnd)
rem Debug.Print x
End If
End Function