"Del" <delweeks@earth link.net> wrote in message
news:074b01c35a f3$438cce80$a30 1280a@phx.gbl.. .[color=blue]
> Does anyone know how to minimize all the windows on a
> desktop, programatically ?[/color]
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?
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: <074b01c35af3$4 38cce80$a301280 a@phx.gbl>
<jeGXa.650991$V i5.15487535@new s1.calgary.shaw .ca>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: johnkenn@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.publi c.dotnet.genera l
| Message-ID: <jXJgcTDXDHA.20 00@cpmsftngxa06 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.genera l
| Lines: 6
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l: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?
|
|
Comment