Tutorial 1 AN INTRODUCTION TO VISUAL BASIC
Lesson A: Creating a New Project
Starting Visual Basic
The Visual Basic Startup Screen
Setting the Project’s Name Property
Saving a Visual Basic Project
Starting and Ending a Visual Basic Project
Opening a New Project
Opening an Existing Project
Exiting Visual Basic
Lesson B: Working with Controls
Getting Help in Visual Basic
Adding a Control to a Form
Sizing, Moving, and Deleting a Control
Adding Label Controls to the Copyright Screen
Setting the Properties of a Label Control
Setting the Left and Top Properties
Changing the Property for More than One Control at a Time
Saving Files Under a Different Name
Lesson C: Writing Code
Adding an Image Control to the Form
Adding a Command Button to the From
Writing Visual Basic Code
Setting the BorderStyle Property
Adding a Frame Control to a Form
Hiding and Displaying Controls
The Options Dialog Box
Adding a Scroller Control to the Form
Changing the Code Window Display
Printing a Visual Basic Application
Making an Executable (.exe) File
Tutorial 2 DESIGNING APPLICATIONS
Lesson A: Planning an OOED Application in Visual Basic
Creating an OOED Application
Planning an OOED Application
Lesson B: Building the User Interface
Preparing to Create the User Interface
Adding a Text Box Control to the Form
Controlling the Focus with the TabIndex Property
Locking the Controls on a Form
Assigning Access Keys
Lesson C: Coding, Testing, Debugging, and Documenting the Application
Coding the Application
Code the Print Order Button
Coding the Clear Screen Button
Writing Visual Basic Equations
Coding the Calculate Order Button
The Val Function
Using the format Function
The MinButton, MaxButton, ControlBox, and BorderStyle Properties
Testing and Debugging the Application
Assembling the Documentation
Tutorial 3 USING VARIABLES AND CONSTANTS
Lesson A: Creating Variables and Constants
Using Variables to Store Information
Declaring a Variable
Storing Data in a Variable
The Scope of a Variable
The Option Explicit Statement
Creating a Local Variable
Creating a Form-Level Variable
Creating a Global Variable
Removing and Adding a File
Symbolic Constants
Lesson B: Modifying the Skate-Away Sales Application
Storing Information Using Local and Form-Level Variables
Modifying the Calculate Order Button’s Code
Concatenating String
The InputBox Function
The Newline Character
The Object Browser
Making a Command Button the Default Button
Lesson C: Improving the Appearance of the Skate-Away Sales Application
Using a Dialog Box
Adding an Existing Form to the Application
Loading and Displaying a Form
Adding the Copyright Form to the Project
Tutorial 4 THE SELECTION STRUCTURE
Lesson A: More Visual Basic Controls
The Math Application
Using Visual Basic’s Icons
Adding an Option Button Control to the Form
Adding a Check Box control to the Form
Drawing a Control in a Frame
Coding the Level 1 and Level 2 Option Buttons
Creating a User-Defined Sub Procedure
The Call Statement
Coding the Addition and Subtraction Option buttons
Creating a Default Option button
Lesson B: Completing the Math Application
Static Variables
Coding the Verify Answer Button
The GotFocus Event
Coding the Display Summary Information Check Box
Tutorial 5 THE REPETITION STRUCTURE
Lesson A: Using Control Arrays
The Grade Application
Creating a Control Array While Adding Controls to the Form
Make\ing Existing Controls into a Control Array
The Enabled Property
Viewing the code Window for a control Array
Coding the Check box Array
Coding a Control’s Array’s GotFocus Event
Lesson B: Completing the Grade Application
The Change Event
Centering the Contents of a Label Control
Using the MsgBox function to Communicate with the User
The Unload Event
Tutorial 6 SEQUENTIAL ACCESS FILES, MENUS, AND REPORTS
Lesson A: Sequential Access Data Files and Reports
Creating the PAO Application
Creating a List Box
Data Files
Sequential Access Data Files
Coding the Enter Information Command button
Opening a Data File
Writing to a Sequential Access File
Coding the display Totals Button
Reading a Record from a Sequential Access file
Lesson B: Menus
Creating the Text Editor
The MultiLine Property and the ScrollBars Property
Sizing a Control Along With the Form
Adding a Menu Control to the Form
Creating the Edit Menu
Coding Menu Items
The Clipboard Object
Coding the Edit Menu
Coding the Edit Menu’s Copy Command
Coding the Edite Menu’s Cut Command
Coding the Edit Menu’s Paste Command
Lesson C: String Manipulation
Visual Basic’s String Manipulation Functions
The Left and Right Functions
The Mid Function
The Instr Function
Coding the Edit Menu’s Find Command
Coding the Edit Menu’s Find Next Command
Tutorial 7 DIALOG BOXES AND ERROR TRAPPING
Lesson A: Dialog Boxes
The Common Dialog Control
Displaying an Open Dialog Box
Displaying a Save As Dialog Box
Displaying a Print Dialog Box
The Flags Property
Displaying a Font Dialog Box
Displaying a Color Dialog Box
Lesson B: Coding the Text Editor’s File Menu
Opening the Text Editor Application
Coding the Text Editor Application
Coding the File Menu’s Save As Command
Setting the CancelError Property
Coding the File Menu’s New Command 19
Lesson C: Completing the Text Editor Application
Coding the File Menu’s Save Command
Coding the File Menu’s Print Command
Coding the File Menu’s Open Command
Coding the Form’s Unload Event
Tutorial 8 VARIABLE ARRAYS
Lesson A: Storing Data in a Variable Array
Variable Arrays
Creating a One-dimensional Variable Array
Storing Data in a One-dimensional Variable Array
The President Application
Coding the President Application
The Test Score Application
Tutorial 9 WHAT’S NEW WITH VISUAL BASIC.NET?
Lesson A: Working with Visual Studio.NET
The Visual Studio.NET Environment
Modify Your Profile in the Visual Studio.NET IDE
Using Solution Explorer
Working with Dynamic Help
Using the Task List
The Command Window
Lesson B: Creating a Windows Forms Application Using Visual Basic.NET
Starting Visual Basic.NET
Using Windows Forms
Setting Appearance Properties
Adding ActiveX Calendar, Date, and Time Controls
Adding a Menu and Menu Items
Printing Windows Forms Application Code
Saving and Exiting a Windows Forms Application