Use Window form Button and Label control in VB.NET

In this article I will show to how to use Button and Label control in window form application.
  • 2267

In this article I will show to how to use Button and Label control in window form application.

The step by step methods of start a windows based application form and add controls on the forms.

  1. Start Microsoft visual studio

     a.gif
  2. Go to the File menu and then in New and click on Project.

    1.gif
     
  3. Select Template Visual Basic and Application Type Windows Forms Application.

    2.gif
     
  4. Give the Name and Location To save Project . (Like WindowsApplication1 and C:\visual studio 2010\Projects)

    3.gif
     
  5. You can now add Controls on form by using Toolbox which is left side of the IDE.

    4.gif
     
  6. Add a Label : There is Three way to add a Label on Form:

    a. Double click on Label in Toolbox .

    b. Drag Label From Toolbox and Drop on Form. 

    c. Double Click on Form and Write the Code for Adding a Label on Form.

    5.gif

        Private Sub Label1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs)Handles Label1.Click

       End Sub
     

  7. Same Above Three Steps are using for Add Textbox Control on Form.

    6.gif
    a. Double click on Textbox in Toolbox .

    b. Drag Textbox From Toolbox and Drop on Form.

    c. Double Click on Form and Write the Code for Adding a Textbox on Form.

        Private Sub TextBox1_TextChanged(ByVal sender As System.Object,ByVal e AsSystem.EventArgs) Handles TextBox1.TextChanged

        End Sub
     

  8. Now You Can Debug Your Program By pressing F5 or Directly press the Debug Button on Standard Toolbar.

    7.gif
     
  9. The Output Screen is Show.

    8.gif
     

Summary

In this small article you have learned how to use Button and Label control in window form application.

  

Categories

More Articles

© 2018 DotNetHeaven. All rights reserved.