Solved

Minimizing windows when Running VB application

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

746 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

13 Experts available now in Live!

Get 1:1 Help Now