Dennis,

It would require a lot of work but I think you could 
1. place componetID's on all your objects in both forms
2. place in the ONCLICK eep of every object something like
    SET VAR vMyLastClick = 'PROPERTY Form1|ComponentID 
 


-----Original Message-----
From: Dennis McGrath <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Fri, 13 Mar 2009 13:08:31 -0500
Subject: [RBASE-L] - Re: Form Focus Question


Larry,
 
Of course we don’t know where on the form the user will click.
It could be anywhere, depending on what they can see.
 
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.
 
And no, I don’t think we want to do the hack, a lot of work as you say.
 
Dennis 
 



From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence 
Lustig
Sent: Friday, March 13, 2009 12:56 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Form Focus Question
 
<< 
We cover part of both forms with another program.
We touch the first form. It comes to the top, but the second is still 
partially hidden.
We want the second form to come to the top also.
>> 
 
This is a toughy.  I assume both forms are called with the MDI option, and 
the second form can't be called modally from the first (which would allow 
only the topmost form to be clicked on, but would, I think, bring the form 
underneath to the top as well).
 
I think you can call SET_FOCUS on a form.  The problem is finding a hook on 
the first form that will run whenever it is brought to the top, to give you 
someplace to put the SET_FOCUS call.  There are several events in the 
underlying Delphi form model (such as OnActivate), but they are not exposed 
in R:Base.
 
Do you know WHERE on the first form the user is going to click?  If so, you 
might want to place some kind of transparent control there that has an ON 
CLICK event associated with it.
 
The only other thing I can think of is to use a UDF to hack into the first 
forms WNDPROC to trap the "bring to top" message and transmit it to the 
second form as well.  That would be a very great deal of work for layout 
payoff, I suspect.
--
Larry
 

Reply via email to