Child form windows

  • Thread starter Thread starter Steve Marsden
  • Start date Start date
S

Steve Marsden

Hi

In WIN32 if you create a top level main window and then create a child
window which is a child of the main window, the child window moves with the
main window, cannot be moved out of the main window and cannot be activated
by clicking on it (the main parent window is activated).

I want this same behaviour with Windows Forms in C++ but cannot achieve it.

I have tried creating two windows forms and then setting the parent of the
second form to the first form with child->parent=mainform but the second
window just acts like a top level window.

How do I make one windows form a true child of another windows form.

Thanks

Steve
 
I thought I had solved this when I found the Owner property but this doesn't
seem to work either
 
Steve Marsden said:
How do I make one windows form a true child of another windows form.

Set its 'TopLevel' property to 'FALSE' and add it to the form's 'Controls'
collection.
 
Back
Top