Using Tab Controls

A

Anil Gupte

I have a question about using Tab Controls. I currently have an application
with three forms. One, the MDI Parent (FormContainer) is empty, and on load
or when a menu item is clicked it shows the first form:

Private Sub mnu2Main_Click
frmMain.Show()
frmSInfo.Hide()
End Sub

or
Private Sub FormContainer_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
frmMain.MdiParent = Me
frmSliceInfo.MdiParent = Me
frmMain.Show()
frmMain.Dock = DockStyle.Fill
End Sub

I want people to be able to use Tab Controls instead of (or in addition to)
the menu clicks. How do I do this? Should I insert the Tab Control in the
Container form? Then how do I make it actually show the form? Also, then
does it make sense to combine both forms onto the Parent (Container) form
and show the controls belonging to each form on separate tabs? But
initializing variables and stuff will get messy.

Thoughts?

Thanx in advance.
 
A

Anil Gupte

Related question. Should my MainMenu item be in the FormContainer? Or do I
need to have it in each form? I already have it in Form Main - is there an
easy way to move it?

Oh and yes, I noticed my mistake in the name of SliceInfo and Sinfo - it was
a typo, but the program code is correct.

Thanx again,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top