Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

Docking and event problem!! Help!!

Hi:

I´m using a dll with a form inside where I have a Panel to dock some forms inherited from another form.

What I do is the following:

var
   Form1: TMyInheritedForm;
...

Form1:=TFormDock.Create(Application);
Self.Panel1.DockSite:=true;
Form1.ManualDock(Panel1);
Form1.Show;

This goes OK. The problem is that I have a event to manage the keys in the ancestor form of Form1, where I need to know which Control is tha actual ActiveControl. So, what I do is to say to the main form that his event, for example, OnKeyDown is the OnKeyDown event of Form1 but when the call to the event is made Form1 always says that ActiveControl is nil. Only when form1 is docked.

I don´t know what to do because I need that property.

Please if somebody can help it´ll be very useful.

Thank you in advanced.

0
jmzea
Asked:
jmzea
1 Solution
 
geobulCommented:
Hi,

Perhaps you could use Screen.ActiveControl instead of FormX.ActiveControl. It doesn't depend on the current form that has the focus.

Regards, Geo
0
 
jmzeaAuthor Commented:
Yeah Geo, that works! The only thing is that I have to change now the ancestor of the form. It somebody now how to do it in another way, pease tell me.

But by now, this is OK.

Thank you Geo.

Regards.
0
 
geobulCommented:
You are welcome.

I can't understand your second question. Would you explain it in details, please?

Regards, Geo
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
CleanupPingCommented:
jmzea:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
geobulCommented:
I've answered here.
0
 
snehanshuCommented:
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: geobul

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now