Solved

Minimizing windows when Running VB application

Posted on 2003-12-09
3
210 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 86
Run code from text file in vb 1 65
Excel VBA, find a string in a column, update a cell 7 81
How to make an ADE file by code? 11 87
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 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