Use Tab Control
Imports System.Windows.Forms
Module Module1
Sub Main()
Application.Run(New Form1)
End Sub
End Module
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
Friend WithEvents TabPage4 As System.Windows.Forms.TabPage
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.TextBox3 = New System.Windows.Forms.TextBox()
Me.TabPage4 = New System.Windows.Forms.TabPage()
Me.TextBox4 = New System.Windows.Forms.TextBox()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.TabPage2.SuspendLayout()
Me.TabPage3.SuspendLayout()
Me.TabPage4.SuspendLayout()
Me.SuspendLayout()
'
'TabControl1
'
Me.TabControl1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabPage1, Me.TabPage2, Me.TabPage3, Me.TabPage4})
Me.TabControl1.Location = New System.Drawing.Point(48, 48)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(288, 200)
Me.TabControl1.TabIndex = 0
'
'TabPage1
'
Me.TabPage1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox1})
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Size = New System.Drawing.Size(280, 174)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Visual Basic .Net"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(8, 8)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(264, 160)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = ""
'
'TabPage2
'
Me.TabPage2.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox2})
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Size = New System.Drawing.Size(280, 174)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "C# "
'
'TextBox2
'
Me.TextBox2.Location = New System.Drawing.Point(8, 8)
Me.TextBox2.Multiline = True
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(264, 160)
Me.TextBox2.TabIndex = 0
Me.TextBox2.Text = ""
'
'TabPage3
'
Me.TabPage3.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox3})
Me.TabPage3.Location = New System.Drawing.Point(4, 22)
Me.TabPage3.Name = "TabPage3"
Me.TabPage3.Size = New System.Drawing.Size(280, 174)
Me.TabPage3.TabIndex = 2
Me.TabPage3.Text = "HTML"
'
'TextBox3
'
Me.TextBox3.Location = New System.Drawing.Point(8, 8)
Me.TextBox3.Multiline = True
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(264, 160)
Me.TextBox3.TabIndex = 0
Me.TextBox3.Text = ""
'
'TabPage4
'
Me.TabPage4.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox4})
Me.TabPage4.Location = New System.Drawing.Point(4, 22)
Me.TabPage4.Name = "TabPage4"
Me.TabPage4.Size = New System.Drawing.Size(280, 174)
Me.TabPage4.TabIndex = 3
Me.TabPage4.Text = "Upgrading"
'
'TextBox4
'
Me.TextBox4.Location = New System.Drawing.Point(8, 8)
Me.TextBox4.Multiline = True
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(264, 160)
Me.TextBox4.TabIndex = 0
Me.TextBox4.Text = ""
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(528, 389)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TabControl1})
Me.Name = "Form1"
Me.Text = "TabControlDemo"
Me.TabControl1.ResumeLayout(False)
Me.TabPage1.ResumeLayout(False)
Me.TabPage2.ResumeLayout(False)
Me.TabPage3.ResumeLayout(False)
Me.TabPage4.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Activated(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Activated
TextBox1.Text = "some text"
TextBox2.Text = "some text"
TextBox3.Text = "some text"
TextBox4.Text = "some text"
End Sub
End Class
Related examples in the same category