473,322 Members | 1,425 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,322 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 2315
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.