Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabControl ?

Status
Not open for further replies.

Perilous1

IS-IT--Management
Mar 10, 2005
171
US
Migrating myself over from VB6 and took an immediate interest in TabControl. I've read a bit on it and learned that it's a container that will display other controls. My question is, what about other Forms? To start with I am simply looking to have multiple forms that are all the same size and open at the same location on the screen so that tabbing through them will appear seamless.

I concede that I am likely missing the bigger picture in using TabControl in this fashion and would appreciate any information about it. Thanks.
 
I withdraw the question. Unless I am mistaken, any control at all can be placed within a TabControl container and therefore various tabs can act as the Forms themselves.
 
You can add forms as child controls within a form. You can do this through code easily. The code would look like the following:
Code:
        Dim f1 As New Form1
        f1.TopLevel = False
        f1.Show()
        Me.TabControl1.TabPages(0).Controls.Add(f1)

However, I'm not sure you would really want to. If you're simply wanting to use forms to act as containers for other controls, then use a Panel control. You can also create customer UserControls instead of forms. The advantage here is that they will appear in your ToolBox for drag and drop onto your designer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top