Saturday, 28 January 2012

vb.net code for tab in form ?


How to use tab in form in vb.net?
This tutorial you can learn how to use tab in form
Step1:
Open Microsoft visual studio 2010
Step2:
Open file new à windows form application à rename it as tabpage
Step3:
Drag and drop the tab control, two button,  two textbox
Change the properties of tab control
 Step4:
Write or copy the below code
Code:
Public Class Form1
    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
        TextBox1.Text = "your in first tab"
        MessageBox.Show("you lern how to use tab control in vb.net")
    End Sub

    Private SubButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton2.Click
        TextBox2.Text = "your in the second tab"
        MessageBox.Show("you learn how to click the second tab")
    End Sub
End Class

Output:

No comments:

Post a Comment