Wal Mart Online → Best Selection

Last Modified:


Visual Basic

Introduction to VB.NET

.NET Framework

VS2008 IDE

How VB is Compiled

Start Visual Studio

Windows Form App

Save Your Work

VB OOP Programming

Visual Basic Code

Exit Code

Button Event Code

Coding Recommendations


Error List Window

Comment Syntax

Help Window

Language Essentianl

Built-In Data Types

Declare Variables

Declare Constants

Code Arithmetic Expressions

Assignment Statements

Operator Precedence

Type Casting

Math Class

String Declaration

Conversion Functions

Conversion Methods

Formatting Functions

String Formatting

Variable Scope


Nullable Types

Loop Constructs

For Next Loop

Do While Loop

Do Until Loop



Exit Do | Exit For


Nested Loops


Array Declaration

Rnd( ) Function

Listbox Control


Parallel Arrays

Key Event Args

Dynamic Arrays

Redimension Array

Set Breakpoint

Start Debugger

ReDim Preserve

MultiDimensional Arrays

DataGridView Control

Length and Sort Methods


Pad Right

Split Method

IsNumeric Function

Multiform Projects

Add Form To Project

Form Object Methods

Form Show Method

ShowDialog Method

Form Close Method

Form Accept Button

Multiform Project Example

ASP.NET Web Programming

Create Data Source

Configure Access Data Source

Add Product Class

Extract Local Database Data

Order PageLoad VB Code

Add New Web Page

Set Start Page

Display Cart Aspx Code

Display Cart Design View

Sorted List Definition

VB.NET Session State

Create CartItem Class

GetCartContents Function

Add To Cart Event Handler

Remove Cart Item Event

Clear Cart Event Handler

How to Design a Windows Forms Application

From the Microsoft Visual Studio Start Page, select File → New Project as indicated in the diagram below:

File → New Project

Figure VB-7: Visual Studio File → New Project

Visual Studio will bring up the New Project Template Selector as illustrated in the diagram below:

VB Form App

Figure VB-8: Microsoft Visual Basic New Project Form Application

As indicated in Figure VB-8 perform the following 5 steps:

  1. Select Visual Basic as the project language.
  2. Select Windows as the project type.
  3. Select Windows Forms Application as the Visual Studio Installed Template.
  4. Change the Name: to InvoiceTotal1 in the Project Name TextBox.
  5. Press OK.

After performing the preceding steps - the Visual Basic Design View window will appear on your screen as illustrated in the diagram below:

Design View

Figure VB-9: Visual Basic Design View Screen

Some terms that we will be referencing at a later point in the guide illustrated in Figure VB-9 are:

  • File Selection Menu: Menu options performing system actions such as Save Project
  • Debug Program: Icon to test our Visual Basic program.
  • Design Tabs: Selectors to move between Source code and Forms
  • Design Form: User Interface.
  • Control Toolbox: Templates for control to be placed on the form.

Select Toolbox → Common Controls as indicated in the diagram below:

Toolbox Common Controls

Figure VB-10: Visual Basic Toolbox Common Controls

  1. Left-Click the Toolbox: to make it visible.
  2. Left-Click the '+' on Common Controls: to expand the Common Control Toolbox Menu.

After the Common Controls Toolbox subsection is opened the Visual Studio Integrated Development Environment should appear as illustrated in the diagram below:

Select Toolbox

Figure VB-11: Visual Basic Common Controls Toolbox Selecting TextBox Control

A Textbox Control needs to be placed on the Design Form in the approximate location indicated in Figure VB-11. The procedure for placing a control on the Design Form, which is located in the Toolbox is as follows:

  1. Position Mouse Pointer over the desired control in the Toolbox.
    • Windows will highlight the currently selectable control.
  2. Press and Hold the left mouse button once the desired control has been highlighted.
    • Windows will give a short description of the features of the control with a pop-up message.
    • In this case the messsage says: "Enables the user to enter text, ...
  3. Drag Control to the approximate location on the design form.
    • More precise positioning can be performed after the toolbox control is placed on the Design Form.
  4. Release Left Mouse Button to complete the initial control placement procedure.

Once the TextBox control is placed on the Design Form. We can faciliate placement of the remaining controls by locking the Toolbox menu in the Open Position by Left-Clicking on the Thumb Tack and having the needle point downward as illustrated in the diagram below:

Lock Toolbox

Figure VB-12: Lock Visual Studio Toolbox in Open Position

Once you have locked the toolbox in the open position, you are ready to finish placement of your controls. Press Next to continue the Windows Forms Application development guide:

Help Support this site

Thank you

Work from Home
Become Certified