returning focus to mdi child

Quote
> my MDI app has a toolbox with n edit control inside.
> I need that if I press Cancel, the focus is returned back to the MDI child
> that was active before the toolbox got the focus.
> So I made a local menu which handles Esc key and from the handler I call a
> method Reactivate defined in my MDI child (=typecasted
> Application.MainForm.ActiveMDIChild). This method should take care of
> setting focus to a proper control.
> But:
> - when this method contains only MyControl.SetFocus, it is ignored

That is because the child form is not active, the toolbox window is. Call
the childforms BringToFront method, even if is already in front.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!