Monday, July 11, 2011

Adding a Tool To a Form


How to Add a Control to your VB.Net Forms

Let's start with Adding a Textbox to a Form.

Step 1 : Locate the Textbox Tool  (View Image)

Step 2 : Drag or Double click the icon

The textbox gets added to the top left position of your form. (View Image)




Step 3 : Drag to a New Position


To move it down, hold your mouse over the textbox and drag to a new position (View Image)

Step 4 : Resize the Textbox


Notice the small squares around the textbox. These are sizing handles. Point your mouse over one of them and the mouse pointer turns into an extended line with arrowheads. 


Hold your left mouse button down and drag outwards. The textbox is resized.
Play around with the sizing handles until you're happy with the size of your textbox. (View Image)



Step 5 : Add Multiple Textboxes (Use Step 1 to Step 4) (View Image)





Adding a Label to your Form  

Step 1: Locate the Textbox Tool (View Image)

Step 2 : Drag or Double click the icon (View Image)

Step 3 : Add Multiple Labels

Create two more labels, and position them to the left of the textboxes. (View Image)




Step 4 : Run the Program


Click Debug > Start from the menu bar. Or Press F5. (View Image)


Stop Debugging the Program

1. Click the Red X at the top right of your Form


2. Click Debug > Stop Debugging from the menu bar


3. Press Shift + F5 on your keyboard (View Image)

You can also click the Stop button on the VB toolbars at the top (View Image).


Visual Basic.Net Online Programming