Edit Article

Edited by UndeadEd, Molly, Bowser Jr, Teresa and 8 others

This article simply details how to add a text box to your Visual Basic Form.

Edit Steps

  1. Add a Text Box in Visual Basic Step 1.jpg
    1
    Open Visual Basic
  2. Add a Text Box in Visual Basic Step 2.jpg
    2
    Open a new or existing Visual Basic project file.
  3. Add a Text Box in Visual Basic Step 3.jpg
    3
    Go to tools, scroll until you find "Textbox".
  4. Add a Text Box in Visual Basic Step 4.jpg
    4
    Click and drag the text box into the form. (The "form" is the empty application that is presented on the screen. Your application design is laid out on the form.)
  5. Add a Text Box in Visual Basic Step 5.jpg
    5
    After that, you can move, resize, and change its properties to suit your needs. You can set a default text, change the font of the text box. You can also make it "grayed out" (not editable), or even make it invisible. The 'Properties' dialog usually appears on the side pane of the screen.
  6. Add a Text Box in Visual Basic Step 6.jpg
    6
    It is a good practice to add a "Label" onto its side, to make it user-friendly. Go to tools, scroll until you find "Label" and drag it near the text box, and label the text box (e.g. "Name: "). The text of the label can be changed under Properties (scroll down until you find the "Text" field).
  7. Add a Text Box in Visual Basic Step 7.jpg
    7
    After adding the text box and adjusting its properties, you can begin coding for the text box. There are many articles about programming if you can't, one of them is Create Your First Visual Basic Project (2008 Express). (This assumes you are using Visual Basic 2008 Express).


Article Info

Categories: Visual Basic

Recent edits by: Tigerflower2, BR, Vishal M

Thanks to all authors for creating a page that has been read 7,137 times.

Was this article accurate?

YesNo