Hi,
I want to dispaly different forms in different tab pages of tab
control. How can I do this?
any help is appreciated.
Regards,
RbsnBph
Claudio Grazioli - 18 Apr 2005 10:55 GMT
> Hi,
> I want to dispaly different forms in different tab pages of tab
> control. How can I do this?
> any help is appreciated.
> Regards,
> RbsnBph
I suggest to use UserControls instead of Forms. That's kind of the
"official" way.

Signature
Claudio Grazioli
http://www.grazioli.ch
http://www.grazioli.ch/HommingbergerGepardenforelle/
Nikos Steiakakis - 18 Apr 2005 12:18 GMT
A "quick-and-dirty" way to do it is this.
Your "inner" froms, that is the ones that you want to put on the tabs
sheets, should have a "none" borderstyle.
On the constructor of your container form, the one with the tabsheets you
should have code somewhat like this:
// myInnerForm is the form to be placed inside the tabpage
myInnerForm.SetBounds(TabPage1.Bounds.X,TabPage1.Bounds.Y,
TabPage1.Bounds.Width, TabPage1.Bounds.Height);
TabPage1.Controls.Add(myInnerForm);
// tabMain is the TabControl
tabMain.TabPages.Add(pTabPage1);
It worked fine for me, hope it works for you too
> Hi,
> I want to dispaly different forms in different tab pages of tab
> control. How can I do this?
> any help is appreciated.
> Regards,
> RbsnBph
AviD - 18 Apr 2005 13:29 GMT
I don't think a form can be displayed within tab or can be a child control of
a tab. What you need is a control that simulates the appearance of a form.
For this one you may try adxSuperPanel. At www.gzdsoftware.com
Avi
> Hi,
> I want to dispaly different forms in different tab pages of tab
> control. How can I do this?
> any help is appreciated.
> Regards,
> RbsnBph
Herfried K. Wagner [MVP] - 18 Apr 2005 18:54 GMT
"RbanBph" <RbanBph@discussions.microsoft.com> schrieb:
> I want to dispaly different forms in different tab pages of tab
> control. How can I do this?
> any help is appreciated.
You can do that using usercontrols (composite controls):
"Project" -> "Add user control...".

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