by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 1st August 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
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)
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
No comments have been posted about Show,Hide,Maximize,Minimize,Restore and more with ShowWindow API. Why not be the first to post a comment about Show,Hide,Maximize,Minimize,Restore and more with ShowWindow API.