That is true. The problem is detecting when the first form gets the focus.
There is no GOT_FOCUS EEP

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of MikeB
Sent: Friday, March 13, 2009 10:50 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Form Focus Question

if you issue the command:

SetFocus mdiFormName

where mdiFormName is the ALIAS of the MDI form, the form will be brought to 
the foreground.

----- Original Message ----- 
From: "Lawrence Lustig" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Friday, March 13, 2009 2:40 PM
Subject: [RBASE-L] - Re: Form Focus Question


<<
The two forms move around the desktop
together, one below the other, using a timer to achieve this.
I thought we could use this eep but we can
only tell when the forms have moved, not whether focus has returned to one 
of
them.
>>

Well, I think you could work along these lines.  I suspect there's either a 
direct call you can make into Windows to learn whether a particular window 
is on top, or to get it's zorder, or has focus, or belongs to the 
_application_ with focus; or else it would be fairly straightforward to 
write a UDF to do this.  You could make that call in your timer and then, if 
it turns out your window or application is on top, bring the other window to 
the fore as well.

Another idea.  Are the two forms in your application ALWAYS linked this way, 
or are they used separately elsewhere?  If they're always associated, what I 
sometimes to is write a single form with two "appearances".  The user switch 
between them with a "Details" button, which makes the form larger and 
exposes some more controls.  This has a similar effect, but uses only one 
window.
--
Larry


Reply via email to