Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

API to minimize windows?

9 views
Skip to first unread message

Ryan Bernardini

unread,
Jun 28, 1999, 3:00:00 AM6/28/99
to
Does anyone know how to perform the same thing that the SHOW DESKTOP button
does in win95/95? Or, how would I minimize all windows ... just like if you
right click on the taskbar and choose "Minimize all Windows"

thanks,
ryan

Klaus H. Probst

unread,
Jun 28, 1999, 3:00:00 AM6/28/99
to
Ryan,

Hop over to www.mvps.org/vbnet/. Randy Birch has a sample there that does this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please post/reply to the newsgroup(s) so
that everyone can benefit from the discussion.

Regards,

Klaus H. Probst, MCP
kpr...@altavista.net
ICQ: 22454937
The VB Box: http://members.xoom.com/kprobst/
~~~~~~~~~~~~~~~~~~~~~~~~~~~


Ryan Bernardini <ry...@eticomm.net> wrote in message
news:3777c...@news.eticomm.net...

Jody Gelowitz

unread,
Jun 28, 1999, 3:00:00 AM6/28/99
to
Private Const WM_COMMAND = &H111
Private Const MIN_ALL = 419
Private Const MIN_ALL_UNDO = 416

Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long

Declare Function SendMessage Lib "USER32" Alias "SendMessageA" (ByVal hWnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

'--------------------------

Dim TrayHandle as Long

'Minimize all windows
TrayHandle = FindWindow("Shell_TrayWnd", vbNullString)
r = SendMessage(TrayHandle, WM_COMMAND, MIN_ALL, 0&)
DoEvents

'Restore all windows
r = SendMessage(TrayHandle, WM_COMMAND, MIN_ALL_UNDO, 0&)

--
Later,
Jody

jo...@visual-statement.com
http://www.visual-statement.com/vb

Ryan Bernardini wrote in message <3777c...@news.eticomm.net>...

galen nickerson

unread,
Jun 28, 1999, 3:00:00 AM6/28/99
to

Hi Ryan. See if this helps:

HOWTO: Minimize All Windows From Visual Basic
Article ID: Q194914
http://support.microsoft.com/support/kb/articles/q194/9/14.asp?FR=0

'-------
galen


0 new messages