Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


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