New topic: 

How to know what window is active

<http://forums.realsoftware.com/viewtopic.php?t=47937>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        MaxMBJ          Post subject: How to know what window is 
activePosted: Tue May 21, 2013 11:55 am                         
Joined: Thu Feb 03, 2011 11:47 am
Posts: 129                I should know this but I don't:  how can I tell which 
window is presently active (or perhaps better stated, has the focus)?   
                             Top                timhare          Post subject: 
Re: How to know what window is activePosted: Tue May 21, 2013 3:30 pm           
              
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12361
Location: Portland, OR  USA                Window(0) is the topmost of your 
windows, and would be the one with focus if your app has focus.  But it doesn't 
tell you which of the many apps running on the machine has focus.  Finding that 
is platform specific and requires a different mechanism for each platform.   
                             Top                HMARROQUINC          Post 
subject: Re: How to know what window is activePosted: Tue May 21, 2013 6:44 pm  
                               
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 573
Location: Guatemala, Central America                I've handled this many 
different ways but a simple approach I've used is to have a global property 
that is updated each time a window gets focus, something like App.ActiveWindow 
and check against it when I need to find out which was the last window that got 
focus. Yup, not elegant but for simple stuff it works for me.      
_________________
Future RS guru.
Ride the world!  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to