Visual Basic .NET Tutorialby: Paul Michelbrink Jan 15, 2004
This tutorial was originally prepared by Sarah Thompson for Visual Basic 4.0.
INTRODUCTION 3
PROGRAMMING TOOLS 3
TOOL BAR 3
TOOL BOX 4
PROPERTIES WINDOW 7
HOW TO BEGIN 9
IMPLEMENTING THE VISUAL STACK PROGRAM 10
Step 1 : “The blank form properties” 10
ADDING AN ICON 11
Step 2 : “Adding objects to our form” 11
Step 3 : “Changing the Properties of the controls.” 14
COMMAND BUTTONS: 14
PICTURES: 15
LABELS: 16
TEXT BOX: 16
MENUS: 16
ADDING NEW FORMS 19
ADDING THE CODE TO THE FORMS 20
THE SOURCE CODE: 21
ABOUT FORM: 21
DEFINITION FORM: 21
STACK FORM: 21
STACK FORM CODE: 22
Text Box Code: 23
PUSH: 23
POP: 24
PEEK: 24
INITIALIZE: 24
MENU CODE 25
INTRODUCTION
Visual Basic is a programming language that is designed especially for windows
programming. This tutorial will step through and demonstrate some of the features of
Visual Basic. It will explain most of the tools available for implementing GUI based
programs. After introducing the basic facilities and tools provided by Visual Basic, we
apply our knowledge to implementing a small VB program. Our program will implement
a visual interface for a commonly know “stack” abstract data type.
PROGRAMMING TOOLS
First, we must look at the different tools that we have to work with. When you are
creating a program you must interact with four main windows. They are the Tool bar,
Tool box, Project box, and the Properties window.
TOOL BAR
The tool bar is the bar is at the very top of the editing window. It consists of the
dropdown menus: File, Edit, View, Project, Build, Debug, Data, Tools, Window, and
Help. Below those options are the “quick buttons”. These buttons, reading from left to
right are: New Project, New Form, Open File, Save File, Save All, Cut, Copy, Paste,
Undo, Redo, Navigate Backward, Navigate Forward, Solution Configurations, Find,
Solution Explorer, Properties, Toolbox, and Class View.