Solved

Minimizing windows when Running VB application

Posted on 2003-12-09
3
209 Views
Last Modified: 2010-05-01
Hi

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

Thanks
0
Comment
Question by:Reachtabhair
  • 2
3 Comments
 
LVL 24

Accepted Solution

by:
R_Rajesh earned 50 total points
ID: 9904627
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
 
LVL 24

Expert Comment

by:R_Rajesh
ID: 9904692
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
 

Author Comment

by:Reachtabhair
ID: 9904845
Hey R_Rajesh

Thanks a million

Spot on
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now