Click to See Complete Forum and Search --> : Minilaze all windows


pauel
December 4th, 1999, 10:54 AM
When my application starts, I want to minimaze all applications previously opened by user.
What API can help my with that?
P.

Ravi Kiran
December 6th, 1999, 05:15 AM
Just an idea .. ok..

Get the handles of all top level windows, with EnumWindows API. then Post a WM_SIZE message with SIZE_MININISED value for wParam.

Check if it works.
This is the technique used usally to close all windows (with WM_CLOSE message)

RK

Chris Eastwood
December 6th, 1999, 05:23 AM
If you're using VB6, you can use the 'Microsoft Shell Controls and Automation' DLL (set a reference to this DLL through Projects->References, or straight to the file at c:\windowsdirectory\system32\shdoc401.dll)

You can then use code such as :


Dim o as Shell32.Shell
set o = new Shell32.Shell
'
o.MinimizeAll
'
set o = nothing
'






Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb