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

Icons

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

How to Iconize all Open Windows except Hidden Ones (like Systems windows)

Keywords:  @hidden winstate winiconize	

Question:

How do I iconize all open windows, without iconizing the hidden ones?

Answer:

The following code will do it for you:
; Iconize all windows
;BUT NOT THE HIDDEN ONES!!!

AllWins = WinItemize()
nItemCount = ItemCount( AllWins, @TAB )

For nCount = 1 to nItemCount
WinToIconize = ItemExtract( nCount, AllWins, @TAB )
if WinState(WinToIconise) != @HIDDEN
WinIconize( WinToIconize )
endif
Next

OR

See the function WinItemizeEx, and specify @False as the hidden parameter.

 
; Find all windows that are not hidden
wins = WinItemizeEx("",@TRUE,@False)
nItemCount = ItemCount( Wins, @TAB )
For nCount = 1 to nItemCount
WinToIconize = ItemExtract( nCount, Wins, @TAB )
WinIconize( WinToIconize )
endif
Next


Article ID:   W13260
Filename:   Iconize all Windows except Hidden ones.txt
File Created: 2001:01:15:16:04:20
Last Updated: 2001:01:15:16:04:20