Minimizing windows

  • Thread starter Thread starter Del
  • Start date Start date
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?
 
Haha, yes, I found the solution is to send that Windows shortcut - here is
the answer in VB format:

http://support.microsoft.com/default.aspx?scid=http://support.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: <[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (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: <[email protected]>
| 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?
|
|
 
Back
Top