How to Minimize Windows from DesktopX

...and undo minimize

Thursday, February 28, 2008 by SirSmiley | Discussion: DesktopX

This was asked a while ago (I think) and in my quest to learn the shell application object better I stumbled upon some doc's in my knowledgebase.

This script is based on the "Accessing Windows Shell with WSH-Scripts" article under the samples section at http://freenet-homepage.de/gborn/WSHBazaar/WSHBazaar.htm.

This script will toggle minimize/undo minimize the windows.

Code: vbscript
  1. Dim blnMin
  2. blnMin=False ' Default to False. Eg. Windows are usually showing before use
  3. 'Called when L-click on object or its children
  4. Function Object_OnLButtonUpEx(obj, x, y, dragged)
  5. If Not dragged Then
  6. Call ToggleWindows
  7. End If
  8. End Function
  9. Sub ToggleWindows
  10. ' Create Shell Application Object
  11. Set oShell=CreateObject ("Shell.Application")
  12. If blnMin=False Then
  13. blnMin=True
  14. oShell.MinimizeAll
  15. 'oShell.TileVertically
  16. 'oShell.TileHorizontally
  17. 'oShell.CascadeWindows
  18. ElseIf blnMin=True Then
  19. blnMin=False
  20. oShell.UndoMinimizeAll
  21. End If
  22. End Sub

ZubaZ
Reply #1 Thursday, February 28, 2008 2:45 PM
Cool.  Thanks!
HAPTORK
Reply #2 Thursday, February 28, 2008 2:51 PM
Thanks Sir.
SirSmiley
Reply #3 Thursday, February 28, 2008 5:46 PM
Thanks guys.

The linked script shows how to tile & cascade and you just use the undominimizeall method to restore everything.
RomanDA
Reply #4 Thursday, February 28, 2008 7:00 PM
very nice bud..
I love all the things DX can do
ZubaZ
Reply #5 Thursday, February 28, 2008 7:09 PM
I love all the things DX can do
So it's been a while . . lets see what you can do with it.    

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01