Hi there,

Is there a way to display a form onto a tab panel dynamically? I am
trying to supply a form from within a referenced component to the main
application dynamically at runtime. I want the same tab panel to be
able to display any form residing within or outside its assembly. Is
there a way to do this? Thanks in advance!

AM

Re: Load form in a tab panel? by Herfried

Herfried
Mon Nov 14 14:18:00 CST 2005

"Ali M" <alibiz@aliandclaire.com> schrieb:
> Is there a way to display a form onto a tab panel dynamically? I am
> trying to supply a form from within a referenced component to the main
> application dynamically at runtime. I want the same tab panel to be
> able to display any form residing within or outside its assembly.

Maybe creating a usercontrol instead of the form is a better approach. If
you need to use forms for some reason, set the form instance's 'TopLevel'
property to 'False' and add it to the container's 'Controls' collection.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Re: Load form in a tab panel? by Ali

Ali
Mon Nov 14 19:57:32 CST 2005

Thanks for the speedy reply. I tried your suggestion (using the form)
and it works ok. I need to use a form because they need to work
outside of the application too, i.e. they need to be exposed as Forms!
Thanks again...


On Mon, 14 Nov 2005 21:18:00 +0100, "Herfried K. Wagner [MVP]"
<hirf-spam-me-here@gmx.at> wrote:

>"Ali M" <alibiz@aliandclaire.com> schrieb:
>> Is there a way to display a form onto a tab panel dynamically? I am
>> trying to supply a form from within a referenced component to the main
>> application dynamically at runtime. I want the same tab panel to be
>> able to display any form residing within or outside its assembly.
>
>Maybe creating a usercontrol instead of the form is a better approach. If
>you need to use forms for some reason, set the form instance's 'TopLevel'
>property to 'False' and add it to the container's 'Controls' collection.


Re: Load form in a tab panel? by Herfried

Herfried
Tue Nov 15 10:43:49 CST 2005

"Ali M" <alibiz@aliandclaire.com> schrieb:
> Thanks for the speedy reply. I tried your suggestion (using the form)
> and it works ok. I need to use a form because they need to work
> outside of the application too, i.e. they need to be exposed as Forms!

You could simply place the usercontrols on forms if you want to expose them
as forms too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>