[futurebasic] Re: Active Aplication

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Lucy24@...
Date: Sun, 6 Jun 1999 13:09:18 EDT
>> I'm trying to find out if my application is the active application by doing

IF SYSTEM(_aplActive) = _false THEN BEEP:FN inBackground

I'm only using beep for now while I try to get this to work.
When I change to another application I don't get a beep, and all my normal
application events keep occuring and my applications window keeps drawing
pictures. >>

See Reference manual under SYSTEM.

> 0 = your app is running (as a bonus, the exact number tells you which 
_window_ is in the foreground, so you're getting two bits of info in one)
0 = you're in the Finder (devoutly hoping this is what Reference means by 
"system window" !)
< 0 = some other app is in the foreground (but the absolute value of this 
number still tells you which window is on top)

So check for <1 
-- or, more precisely still, check for <> # of the specific window where 
stuff is happening (I do this with background animations to make them stop 
when user opens a secondary window)