1. Best method to see if a window is 'Open' using win32lib.

Hello,

I need to check to see if a window is currently open and I am not seeing any easy way. Am I missing something?

I tried using getWindowInfo() but it only shows whether the window is "active". Which I guess means it has focus because if I open 3 windows and then call getWindowInfo on all 3 then I only ever get a returned status of 1 on the main window. The rest whether they are open or not all return 0.

Whats the best way of going about this? Ideally I just want an easy way of maximizing all open windows or minimizing all open windows. If a window isn't open then I obviously don't want either action to occur to it.

Thanks! Steve

new topic     » topic index » view message » categorize

2. Re: Best method to see if a window is 'Open' using win32lib.

ssallen said...

Hello,

I need to check to see if a window is currently open and I am not seeing any easy way.

Try this ...

   if getControlInfo( aWindow, CONTROLINFO_closed) != 0 then 
      -- Window is closed. 
   else 
      -- Window is opened. 
   end if 

The possible return values are ...

  • -1 : Window has never been opened.
  • 0 : Window is currently opened.
  • 1 : Window is closed.
  • 2 : Window is in the process of being closed.


Hope this helps.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Best method to see if a window is 'Open' using win32lib.

That works perfect!

Thank you sir!

Steve A.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu