WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Minimize all Windows

Keywords:     winiconize minimize all windows

Question:

Is there a way to minimize all windows using winbatch?

Answer:

There is a .SCF file in the Windows System directory that can 'show the desktop'. In other words, minimize *all* windows. This seems to work on *all* platforms *except* Windows NT 4.0, which doesn't seem to support this file.

showdesktop=strcat(DirWindows(1),"Show Desktop.scf")
If FileExist(showdesktop)
  ShellExecute(showdesktop,"",DirWindows(1),@NORMAL,"")
Endif
Or if you want to run this script on NT 4.0 or if the 'Show Desktop.scf' file doesn't exist. Give this a shot:
list=WinItemize()
count=ItemCount(list,@tab)

for xx=1 to count
   thiswin=ItemExtract(xx,list,@tab)
   if WinState(thiswin)==@HIDDEN then continue
   WinIconize(thiswin)
next

Article ID:   W13372
Filename:   Minimize All Windows.txt
File Created: 2001:01:31:11:50:38
Last Updated: 2001:01:31:11:50:38