<http://forum.pspad.com/read.php?f=2&i=10457&t=10455> 
----------------------------------------------------------------

Awhile back I did some work on a Alt+tab replacement. I remember that some
Delphi apps had a wrapper class or 2. You may have a handle to PSPad but
not its parent wrapper class. I think the class name your looking for is
_TApplication_. 

So, you are looping through the windows, checking for ToolWindow, parent
hwnd, and all that jazz check... You will find PSPad (classname TfPSPad)
but that not what you should be minimizing, keep looking cause it has a
parent and it parent has a parent. The top parent of any Delphi app is
TApplication but the catch is that includes both visible windows and
things like tooltips.

As a result, we look for window with a parent whose classname is
TApplication. Then check if the windows classname is TfrmExplorer or
TfrmClassic and we have a winner! That is the window to send SW_MINIMIZE. 

Well, you may now be thinking about any easer way!? Guess what there is
one.


Set SH = CreateObject("Shell.Application")
SH.MinimizeAll
Set SH = Nothing


[%sig%]

-- 
PSPad freeware editor http://www.pspad.com

Reply via email to