Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

Forms in Tab control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RbanBph - 18 Apr 2005 10:37 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
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/>


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.