VB .NET Tabs and Forms

5 pts.
Tags:
forms
TabControl
VB .NET
I'm creating an application that will have several tabs instead of file menu. Is there a way to do this so that I have multiple forms? I don't want to have 1 form with all my code in it and I don't want to create each form with the tabs on it. Basically, can I do an on click with my tab and make it call another form?

Software/Hardware used:
VB .NET

Answer Wiki

Thanks. We'll let you know when a new response is added.

Something like this ?

<pre> Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
If TabControl1.SelectedIndex = 1 Then
Dim myForm As New Form2
myForm.Show()
End If
End Sub</pre>

————

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gent01
    You could do a mdi form, put the tabs in a window across the top and when a tab is clicked instantiate the appropriate from and call form.show .
    1,870 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following