Good Day All -

In an attempt to avoid having to use VB6 UserControls embedded into our top
level form, we are using Forms which are loaded into a UserControl called
PRFormContainer.uclFormContainer. Behind the scenes, this control takes the
form reference, and uses the hWnd property to:

* Set the WS_CHILD style on the form so that it becomes a child window (this
means that the top level form does not lose focus when you set focus onto
the contained form).

* SetParent the form to the top level form (ensuring you save the old form's

* SetWindowPos the form so that it completely fills the UserControl.

This has been working quite nicely up to now, but recently a focus issue
has come up:

After using F1 context help on a text box in the contained form, the help
app appears, but when you go back to the original application, the focus
is now on the first control on the top level window. You have to click once
on the control to activate the top window app, and click once more to get
the control's focus.

Can anybody please give a suggestion as what to do?


Mark Alexander Bertenshaw
Prime Response