
Need to load Form onto Form
Well, after all that, I have found a reasonable solution. First of all,
all of the controls on the top level form must have TabStop set to
False. However, if you want the focus to go to controls in one
particular contained form, this should be the first added control, or
TabStop should be set to True for this particular instance.
Furthermore, the Form Container control should be subclassed for the
WM_SETFOCUS message (UserControl_GotFocus and UserControl_EnterFocus
won't work). If the control receives this message, then it should
SetFocus to the form. This will in turn set the focus to the
ActiveControl on the form.
This is not a perfect generic solution, since it means that the focus
will only return to one of the contained forms, when gaining focus from
another application; however, for my particular application, this is
sufficient.
Mark Alexander Bertenshaw
Programmer/Analyst
Prime Response
Brentford
UK
Sent via Deja.com http://www.deja.com/
Before you buy.