Course description
Skills Gained:
* Build custom, multiple-form applications.
* Incorporate dynamic menus, pop-up menus, status bars, and custom toolbars into applications.
* Implement form-level and field-level input validation.
* Debug applications using debugging tools provided in Visual Basic 6.
* Use standard controls, control arrays, and create controls dynamically.
* Execute centralized error-handling in applications.
* Use the data control for database access.
* Implement drag and drop in Visual Basic-based applications.
* Use Microsoft ActiveX® controls in Visual Basic-based applications.
* Create setup programs to distribute applications.
Key Topics: Module 1: Introduction to Application Development Using Visual Basic
Topics:
Features of Visual Basic
Editions of Visual Basic
Visual Basic terminology
Working in the development environment
Event-driven programming
Creating a program in Visual Basic
Project and executable files
Visual Basic reference materials
Self-check questions
Lab:
Creating a simple application
Students will be able to:
• Identify the elements in the Visual Basic development environment.
• Explain the difference between design time and run time.
• Explain the concept of event-driven programming.
• Describe the purpose of a project file.
• List the file types that can be included in a project.
Module 2: Visual Basic Fundamentals
Topics:
Introduction to objects
Controlling objects
Properties, methods, and events
Working with forms
Introduction to controls
Basic controls
Self-check questions
Lab:
Creating a Visual Basic-based application
Students will be able to:
• Create a simple application using Visual Basic.
• Define and provide examples of each of the following: object, property, method, and event.
• Describe some of the properties and events associated with a form.
• Set properties for command buttons, text boxes, and labels.
• Use the With…End With statement to set multiple property values for a single object.
• Assign code to a control to respond to the Click event.
Module 3: Working with Code and Forms
Topics:
Understanding modules
Using the code editor window
Other code navigation features
Code documentation and formatting
Setting environment options
Setting code formatting options
Automatic code completion features
Interacting with the user
Using the MsgBox function
Using the InputBox function
Working with code statements
Managing forms
Self-check questions
Lab:
Working with forms
Students will be able to:
• Use the editing tools in the Visual Basic Code Editor window to write organized and well-documented code.
• Control the Visual Basic environment and customize it to their needs.
• Display message boxes.
• Use Visual Basic constants and named arguments.
• Differentiate between the Load/Unload statements and use the Show/Hide methods.
• Set the startup form for an application.
• Control a program's closing routine.
Module 4: Variables and Procedures
Topics:
Overview of variables
Declaring variables
Variable scope
Using arrays
User-defined data types
Converting data types
Using constants
Working with procedures
Working with dates and times
Using the Format function
Manipulating text strings
Self-check questions
Lab:
Writing procedures
Students will be able to:
• Explain the various data types used when declaring variables.
• Declare private and public variables.
• Use public variables to use data in multiple forms.
• Describe the difference between a variable and a constant.
• Differentiate between a Sub procedure and a Function procedure.
• Create a Function procedure that accepts arguments and returns a value.
• Describe how a Standard module differs from a Form module.
• Add a Standard module to a project to store general procedures and variables.
• Use Visual Basic functions to manipulate text strings and return the current date and time.
Module 5: Controlling Program Execution
Topics:
Comparison and logical operators
Using If…Then statements
Using Select Case statements
Overview of looping structures
Using Do…Loop structures
For…Next statement
Exiting a loop
Self-check questions
Lab:
Controlling program flow
Students will be able to:
• List techniques for comparing variables and object properties using Visual Basic code.
• Explain the difference between If…Then and Select Case statements and describe the circumstances in which you use each statement.
• Explain the difference between the For…Next and Do…Loop statements.
• Choose the appropriate conditional or looping structure to control program flow.
Module 6: Debugging
Topics:
Types of errors
Break mode
Using the Debug toolbar
Using the Watch window
Using the Immediate window
Using the Locals window
Tracing program flow with the Call Stack
Self-check questions
Lab:
Using the Visual Basic debugging tools
Students will be able to:
• Stop program execution using breakpoints and watch expressions.
• Monitor variable values in the Watch window.
• Test data and a procedure's results in the Immediate window.
• Evaluate variable values in the Locals window. Distinguish among Run, Design, and Debug modes in Visual Basic.
• Trace the program execution sequence using the Call Stack.
Module 7: Working with Controls
Topics:
Types of controls
Overview of standard controls
Using ComboBox and ListBox controls
Using OptionButton and Frame controls
Working with selected text
Advanced standard controls
ActiveX controls
Insertable objects
Self-check questions
Lab:
Working with controls
Students will be able to:
• Identify and use the standard controls in Visual Basic.
• Define how an ActiveX control differs from a standard control.
• Add ActiveX controls to a project and use these controls in a program.
Module 8: Data Access Using the ADO Data Control
Topics:
Overview of ActiveX data objects
Visual Basic data access features
Relational database concepts
Using the ADO Data control to access data
Structured query language (SQL)
Manipulating data
Using Data Form Wizard
Self-check questions
Lab:
Accessing databases
Students will be able to:
• Define the following terms: database, table, field, record, and key.
• Use the ADO Data control to view records in a database.
• Use the ADO Data control to find, modify, delete, and add records.
• List the standard bound controls.
• Define Structured Query Language (SQL).
• Describe the purpose of the SELECT statement in SQL.
• Use Data Form Wizard to design a simple data-entry form.
Module 9: Input Validation
Topics:
Field-level validation
Using text box properties to restrict data entry
Using the Masked Edit control
Form-level validation
Form events used when validating data
Self-check questions
Lab:
Input validation
Students will be able to:
• Create an application that validates user data at the field level and at the form level.
• Create an application that uses the Masked Edit control.
• Create an application that enables or disables controls based on field values.
Module 10: Error Trapping
Topics:
Overview of run-time errors
Overview of the error handling process
The Err object
Errors and the calling chain
Errors in an error-handling routine
Inline error handling
Error-handling styles
General error-trapping options in Visual Basic
Self-check questions
Lab:
Error trapping
Students will be able to:
• Trap run-time errors.
• Create error handlers.
• See how errors are handled in the calling chain.
• Handle errors in an error-handling routine.
• Handle inline errors.
• Describe some common error-handling styles.
• Describe error-trapping options in the Visual Basic development environment.
Module 11: Enhancing the User Interface
Topics:
Menus
Status bars
Toolbars
Lab:
Adding menus
Students will be able to:
• Create and edit custom menu bars, menus, submenus, and menu items using the Menu Editor.
• Identify the menu properties that can be set in the Menu Editor dialog box.
• Create a pop-up menu using the Menu Editor.
• Assign code to menu items that respond to the Click event.
• Create a status bar on a form that provides users with feedback.
• Create a toolbar using the Toolbar control.
Module 12: Drag and Drop
Topics:
Overview of drag and drop
Mouse events
Drag-and-drop basics
Self-check questions
Lab:
Adding drag and drop
Students will be able to:
• Describe the role of mouse events in implementing drag-and-drop features.
• Perform the steps required to add drag-and-drop features to an application.
• Identify the source control and target form or control in a drag-and-drop operation.
• Implement OLE drag-and-drop features.
Day 5
Module 13: More About Controls
Topics:
Collections
Using control arrays
Self-check questions
Lab:
Using control arrays
Students will be able to:
• Define and describe the use of control arrays.
• Create an array of controls.
• Build an application for Visual Basic that dynamically adds and deletes controls.
• Use the Visual Basic Controls collection.
• Create and use object variables.
Module 14: Finishing Touches
Topics:
User interface design principles
Distributing an application
Creating a default project
Review: Steps to creating a Visual Basic program
Development resources
Self-check questions
Lab:
Using the Package and Deployment Wizard
Students will be able to:
• Create applications that incorporate basic principles of user interface design.
• Create a setup program for an application by using Package and Deployment Wizard.
• Create custom projects.
Target Audience: Students who want to develop the skills to become Visual Basic Programmers