473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Minimizing windows

Del
Does anyone know how to minimize all the windows on a
desktop, programatically?
Jul 19 '05 #1
3 2318
MyForm.WindowState=FormWindowState.Minimized

"Del" <de******@earthlink.net> wrote in message
news:07****************************@phx.gbl...
Does anyone know how to minimize all the windows on a
desktop, programatically?

Jul 19 '05 #2
You would need to emunerate all windows on the desktop, and send them all
the necessary minimize message.
Or I wonder if you can cheat and send the same keypress as the Windows Key
& M does?

Jul 19 '05 #3


Haha, yes, I found the solution is to send that Windows shortcut - here is
the answer in VB format:

http://support.microsoft.com/default...microsoft.com:
80/support/kb/articles/Q194/9/14.asp&NoWebContent=1

Private Declare Sub keybd_event Lib "user32" ( _
ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)

Const KEYEVENTF_KEYUP = &H2
Const VK_LWIN = &H5B

Private Sub Command1_Click()
' 77 is the character code for the letter 'M'
Call keybd_event(VK_LWIN, 0, 0, 0)
Call keybd_event(77, 0, 0, 0)
Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub
--------------------
| X-Tomcat-ID: 454005605
| References: <07****************************@phx.gbl>
<je***********************@news1.calgary.shaw.ca >
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: jo******@online.microsoft.com (John Kennedy[MSFT])
| Organization: Microsoft
| Date: Wed, 06 Aug 2003 16:07:33 GMT
| Subject: Re: Minimizing windows
| X-Tomcat-NG: microsoft.public.dotnet.general
| Message-ID: <jX**************@cpmsftngxa06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| Lines: 6
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:103719
| NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
|
| You would need to emunerate all windows on the desktop, and send them all
| the necessary minimize message.
| Or I wonder if you can cheat and send the same keypress as the Windows
Key
| & M does?
|
|

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Del | last post by:
I wish to programatically minimize all windows on the desktop. Can anyone help me in this?
13
by: nospam | last post by:
NEWS.COM Amazon wins patent for ordering forms # 6,615,226 http://tinyurl.com/m7v8 http://news.com.com/2100-1017-5070569.html In its latest patent, the online retailing giant outlined a...
1
by: Smile | last post by:
hi I want a program which when run, hides all the rest of the running applications on the taskbar. or i might want to check something like - If some application is mazimized, then minimize it or...
3
by: NL | last post by:
Hi, Does anybody know how to turn off the animation Windows does with a window as it's minimized/maximized to the taskbar? I have an app which, when minimized, syncs to any other open...
3
by: Del | last post by:
Does anyone know how to minimize all the windows on a desktop, programatically?
7
by: Lee | last post by:
Hi, How do I detect when a form is minimizing? specifically when a user clicks the show desktop button on the taskbar, rather than the minimize button on a form. thanks in advance
5
by: Scott | last post by:
Hi everyone, I have a c# console app that when run through an autorun.inf file, launches a web page from the CD. It works just fine but I would like the console window minimized on startup....
7
by: Abelard | last post by:
How do I programmatically minimize the console window in a VB .NET console application?
3
by: qazplm114477 | last post by:
Hi, I'm having a tiny problem. I have just started playing around with visual basic a week ago so im fairly new at this. I created a method that saves changes when you click a button, once the button...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.