dodge
Active Member
- Joined
- Mar 26, 2007
- Sythe Gold
- 5
- Messages
- 125
Create one main form add a toolstrip and a with a button and add this code to the button click event
add a tabcontrol to the form
create a second form in this case named form2 and add some controls to it
every time you click on the button on the tool of your main form bar you will get a new tab with the second form loaded into it
Code:
Dim nTabpage As New TabPage()
nTabpage.Margin = New Padding(0)
Me.TabControl1.TabPages.Add(nTabpage)
Dim frmUser As New Form2
frmUser.TopLevel = False
frmUser.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
frmUser.Parent = nTabpage
frmUser.Dock = DockStyle.Fill
frmUser.Margin = New Padding(0)
nTabpage.Controls.Add(frmUser)
frmUser.Show()
create a second form in this case named form2 and add some controls to it
every time you click on the button on the tool of your main form bar you will get a new tab with the second form loaded into it

