Creating form contained in another form (NOT MDI)

  • Thread starter Thread starter Ashu
  • Start date Start date
A

Ashu

Hi,
I have a simple form in which I am displaying some images/icons in grid.
Now I want to display a Legend window so that the user can understand
what each icon/image means.

Now am creating this Legend window as a form with form border style set
to tool window....all is fine upto this point, but how do I contain this
form within the other form. The are no MDI forms, so using those options
are ruled out.

Secondly, I want to display this Legend window always above the main
form. It should not be the top most at system/user level, just above the
main form always...


How can I achieve this?


Thanks & Regards,
Ashu
 
I have a simple form in which I am displaying some images/icons in grid.
Now I want to display a Legend window so that the user can understand what
each icon/image means.

Now am creating this Legend window as a form with form border style set to
tool window....all is fine upto this point, but how do I contain this form
within the other form. The are no MDI forms, so using those options are
ruled out.

Why do you want to constrain the legend to the main form? Maybe the user
will want to see the entire area of the form without the legend in the way,
so he'll want to move the legend completely outside the form. Do you have a
good reason for wanting this restriction?
Secondly, I want to display this Legend window always above the main form.
It should not be the top most at system/user level, just above the main
form always...

Use the AddOwnerForm() method of your main form and pass the tool window as
the argument.
 
Thanks a lot!

Jeff said:
Why do you want to constrain the legend to the main form? Maybe the user
will want to see the entire area of the form without the legend in the way,
so he'll want to move the legend completely outside the form. Do you have a
good reason for wanting this restriction?



Use the AddOwnerForm() method of your main form and pass the tool window as
the argument.
 
Back
Top