Show,Hide,Maximize,Minimize,Restore and more with ShowWindow API
Show,Hide,Maximize,Minimize,Restore and more with ShowWindow API
API Declarations
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_MAXIMIZE = 3
Const SW_SHOWNOACTIVATE = 4
Const SW_SHOW = 5
Const SW_MINIMIZE = 6
Const SW_SHOWMINNOACTIVE = 7
Const SW_SHOWNA = 8
Const SW_RESTORE = 9
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Rate Show,Hide,Maximize,Minimize,Restore and more with ShowWindow API
(1(1 Vote))
Dim rval As Long
rval = ShowWindow(Form1.hwnd, SW_HIDE)'Hide Window
Sleep 2000
rval = ShowWindow(Form1.hwnd, SW_SHOWMINIMIZED)'Show Minimize
Sleep 2000
rval = ShowWindow(Form1.hwnd, SW_MAXIMIZE)'Show Maximize
Sleep 2000
rval = ShowWindow(Form1.hwnd, SW_RESTORE)'Restore Window
Sleep 2000
End
End Sub
Show,Hide,Maximize,Minimize,Restore and more with ShowWindow API Comments
No comments yet — be the first to post one!
Post a Comment