Course Outline: Microsoft Visual Basic 6 Programming

This intensive five-day course teaches the principles and practices of using Visual Basic V6 to create polished, working applications that interact with users and can access stored data in databases. Theory and practice combine to give a very well rounded grounding in the capabilities of this extremely popular programming environment, with approximately one third of the time spent developing a practical application employing many of the techniques taught in the course.

Course Duration: 5 Days

Upon completion of the course the delegate should be able to:

  • Use Visual Basic V6 to create, test and debug robust and attractive Win32 applications - these applications will employ multiple forms and controls, use menus, toolbars and drag and drop for enhanced user interaction.
  • Write code appropriately for a variety of situations, using techniques such as branching, looping, and writing procedural code.
  • Know how to write code that is maintainable and uses current programming best practice.
  • Understand the role of Visual Basic V6 in standalone and 2-Tier and n-Tier applications.
  • Design and program applications that access data using ActiveX Data Objects (ADO), through the use of data controls, the Data Environment and also through code.
  • Describe standard database objects and principles, write simple SQL commands (SELECT, UPDATE, INSERT and DELETE) and use them through ADO connection, command and recordset objects in 2-Tier applications.

Intended Audience

This course is designed for IT professionals who wish to learn programming using Microsoft Visual Basic V6. It is also suitable for programmers cross-training from other languages (e.g. C++, COBOL), and for self-taught programmers wishing to refine their skills and learn best practices.

Prerequisites

It is assumed that anyone attending this course is familiar with using Windows ‘98, NT4 or 2000 interfaces. Little or no previous programming is assumed, although general programming conceptual knowledge is advantageous.

Course Format

This intensive course is spread over a five-day period and comprises instructor-led presentations, working sample programs and practical hands-on exercises. The practical sessions are structured to give the delegates an opportunity to put into practice some of the theory covered during the instructor-led sessions, and build upon each other to form a complete application. Each chapter concludes with a summary of best practices for the topics covered.

Course Content

Visual Basic Features

Visual and code elements. VBA. Comparison with other languages. Use in standalone, 2-Tier and 3-Tier data applications. Use of components.

Working with Forms
Project types. Designing forms and using standard controls. Adding controls to and configuring the Toolbox. Use of the Properties window. Frequently used control properties. Naming conventions. Style guides. Project structure and use of templates. Events and event-handlers. Common events. IntelliSense and help. Good coding practices.

Programming
Simple variables. Data structures. Setting references to external libraries. Default VB behavior. Scope of variables. Assignment of values or objects to variables. Invoking methods and manipulating strings. Controlling execution flow by branching or looping. IF test constructs. Comparison operators. SELECT CASE construct. FOR … NEXT loops. DO … WHILE loops. Procedures. Scope of procedures. Subroutines. Functions. Parameters in procedures.

Debugging
Debugging scenarios. Breakpoints, stepping through code. The Debug toolbar. Immediate, Locals and Watch Windows. The Call Stack.

Error Handling
VB default error handling. Error handling techniques. The Err object. Raising errors. Error handling chain and reporting errors.

Data display and validation
Message and Input boxes. Text controls. List box controls. List view controls. Tree view controls.

User Interaction
Multiple form applications. Forms and Controls collections. Standard menus and pop-up menus. Toolbars. Common dialog controls. Preserving user settings using the registry. Control arrays. MDI applications. MDI forms. Drag and Drop (automatic, manual and OLE).

Application and PC Information
The App object. The Screen object. The Printer object. API calls and Declare statements. The API viewer Useful API functions.

Database Overview
Table design. Columns; tables; relationships. Data normalization. SELECT, UPDATE, INSERT and DELETE statements.

Accessing Data Using ADO Controls
Data access overview. ADO object model. Connection, Command and Recordset objects. ADO Data Control. Data Environments. IntelliDrop and bound controls.

Accessing Data Using ADO Code
The ADO Object model. Setting references to ADO. Connection, Command and Recordset objects. sharing ADO connections.

ActiveX Automation
Automation principles. Setting references to libraries. Declaring object variables. Object models. Automation examples.

WORD doc