Minimizing windows when Running VB application

Hi

Is it possible to minimize all windows when running a VB project,
i.e. only VB GUI is maximized.

Thanks
ReachtabhairAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
R_RajeshConnect With a Mentor Commented:
Hi Reachtabhair,

put this in your form load event


-------------
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Form_Load()
thwnd = FindWindow("Shell_TrayWnd", vbNullString)
Ret = PostMessage(thwnd, &H111, 419, 0&)
End Sub
--------------


Cheers!

Rajesh
0
 
R_RajeshCommented:
Reachtabhair,

ofcourse, i am assuming you ment minimize all windows at runtime.

if you want them minimized during design time then simply minimize them manually :)
shortcut to minimize all windows (winkey+M)


Rajesh
0
 
ReachtabhairAuthor Commented:
Hey R_Rajesh

Thanks a million

Spot on
0
All Courses

From novice to tech pro — start learning today.