I could not find a way to get this info from WMI either.

However, what I think you're really looking for are the coordinates
for the top level windows, so there's no need for the processes. To do
this, you need to use the following Windows API's:

EnumWindows (uses a callback to identify each top-level window)
GetWindowText (to get the title of the window)
GetWindowInfo (returns a WINDOWINFO struct, which contains RECT
rcWindow, which is what you're looking for)

These API's are documented at Microsoft's MSDN library:
http://msdn.microsoft.com/library. Basically, the EnumWindows callback
is passed a window handle (hwnd) for each top-level window. The hwnd
can then be passed to GetWindowText and GetWindowInfo to get the
information you need about that window.
I think your angle is heading in the right direction. I found a module called Win32::CaptureIE that does a screenshot capture of an IE browser (cool right?). I may be able to glean some tricks off the codes, but the main difference is that the module creates its own object (via GetObject), so it is able to get the hwnd. But with your EnumWindows suggestion it may just work...


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to