Creating form contained in another form (NOT MDI)

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
 
J

Jeff Johnson

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.
 
A

Ashutosh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top