More general ... hm. What do you mean? All the topmost windows? I think the problem is too varied for a general solution. If you don't know the class names of the windows you want to find the coordinates of, how do you know which ones to choose? Well, you might go and take all the windows that are topmost, but that includes error messages and the task manager and who knows what else, so you might not find any space on the desktop for yourself.
Maybe you want to have an ini-file stating the names of windows that may be present and if they are, consider their boundaries. See below for a small loop to display all the classnames. $_ = $Main->GetWindow (GW_HWNDLAST); do { print Win32::GUI::GetClassName ($_), "\n" if Win32::GUI::IsVisible ($_); } while $_ = Win32::GUI::GetWindow ($_, GW_HWNDPREV); I have a demo-script at www.fairymails.com/perl/, alone.pl, which uses a loop like this not to get the names of windows, but simply hide them - including the task bar - to claim 100% of the desktop. -----Original Message----- From: Glenn Linderman [mailto:[EMAIL PROTECTED] Sent: Samstag, 26. Mai 2001 13:54 To: perl-win32-gui-users@lists.sourceforge.net Subject: Re: [perl-win32-gui-users] Taskbar & perl2exe -gui crash Indeed, this works. I've long wondered about a way to do it, and I've now incorporated this into my (only) Win32::GUI program. I am planning to write some more Win32::GUI programs soon. It seems, though, that this solution isn't completely general. While I don't personally use it anymore, I recall MS Office had an optional taskbar that could be docked similarly to the Windows taskbar. And some laptops have "power management toolbars". etc. Does anyone know of a more general technique for avoiding all the toolbars/taskbars that might nibble away at the edges of the desktop?