(619) 876-4224 x210 info@otstraining.org

Microsoft Visual Basic

Course length: 5 days

Overview: This course will get you started using Microsoft Visual Basic in a productive, hands-on manner. We’ll cover the basics of programming, then move on to Object-Oriented Programming. We’ll also cover Graphical user Interface programming, and show how to connect to databases.

Prerequisites: Basic knowledge of Windows, as well as basic keyboarding skills.

Students will receive a USB flash drive so they can take the exercise files with them.

Class Fee: $2,249

Class Outline

Part 1: Fundamentals
Hello World

  • Console.WriteLine
  • Other Console Methods

Declaring Variables and Assigning Values

  • Allowable Variable Names
  • Primitive Data Types
  • Default Values
  • Constants
  • Converting Between Data Types
  • Nullable Data Types

Accepting Input from the User

  • Accepting Whole Lines
  • Dealing with Single Keypresses

Operators, Expressions and Statements

  • Fundamental Mathematical Operators
  • Precedence Table
  • Assignment Operators
  • Using the Math Library
  • Bit-Shift Operations

Program Flow Control and Branching

  • Boolean Logic
  • Updated Precedence Table
  • If…Then…Else…EndIf
  • Select…Case
  • GoTo
  • Shortened If

Iterations and Looping

  • For…Next…Step
  • For Each Loop
  • Do While Loop
  • Do Until Loop

Working with Strings

  • Various String Methods
  • Split and Join
  • The StringBuilder Class

Formatting Strings for Output

  • The Placeholder
  • Choice

Functions and Helper Methods

  • ByVal and ByRef Definitions
  • Calling Functions
  • Calling Subs
  • Stacking Function Calls

Enumerations and Structures

  • Using Select Case with Enumerations
  • Using Structures

Commenting and Documenting Code

  • The ‘ and REM Statements
  • XML Tags

Arrays, Stacks, Queues and Dictionaries

  • Using Arrays
  • Using Multi-Dimensional Arrays
  • Using Stacks
  • Using Queues
  • Using Dictionaries

Generic Lists

  • Why Use Generic Lists?
  • Adding and Removing Items
  • Capacity and Count
  • Finding Items in a Generic List
  • Clearing Out Lists

Variable Scope

  • Module-Level vs. Method-Level

Reading and Writing Files

  • Creating Files
  • Reading From and Writing To Files
  • Using StreamWriter
  • Using StreamReader
  • Getting FileInfo
  • Other File Methods

Dates and Times

  • DateTime Data Type and Now
  • Formatting Data and Time Output
  • Properties of DateTime
  • Using TimeSpan

Generating Random Numbers

  • Randomize
  • Why Numbers Aren’t Really Random
  • Generic Formula to Get Random Numbers

Handling Exceptions

  • Using On Error GoTo
  • Try..Catch…Finally
  • Why You Should Try to Avoid Erroroneous Input
  • Creating Our Own Exceptions

The My Namespace

  • My.Application
  • My.Computer
  • My.Application.Log
  • My.Settings
  • My.User

Environment Variables

  • Common Environment Variables
  • Getting Computer Information

Command Line Arguments

  • What Are Command-Line Arguments?
  • Environment.GetCommandLineArgs Method

Creating Our Exe

  • Overview of the Properties Panel
  • Setting a Program Icon
  • Setting Up the Windows PATH for command-line compiling
  • Creating Our Documentation Automatically
  • Difference between Executable and Installer

Part 2: Object-Oriented Programming

Introduction to OOP

  • Overview
  • Inheritance
  • Polymorphism
  • Encapsulation

Understanding and Creating Classes

Class Fields and Properties

  • Difference between Fields and Properties
  • Getters and Setters
  • Public, Private, Protected, Shared

Class Methods
Understanding Instantiation
Understanding Inheritance
Overriding Class Methods
Overloading Class Methods

  • A New ToString

Static Methods, Properties and Classes
Auto-Implemented Properties
Creating Constructors and Destructors

  • Constructors
  • Destructors
  • Garbage Collection

Unified Modeling Language and Class Diagrams

  • Using the IDE Class Diagram

Understanding Namespaces and Adding References to Assemblies

Part 3: GUI Programming
Introduction to Event-Driven Programming
Creating Forms and Setting their Properties
Handling Form Events
Adding Controls to a Form

Informational Controls

  • Label, LinkLabel, StatusBar

Command Controls

  • Button, MainMenu, ContextMenuStrip, ToolStrip

Grouping Controls

  • Panel, FlowLayoutPanel, GroupBox, TabControl, SplitContainer, TableLayoutPanel

Text Editing

  • TextBox, RichTextBox

List Selections

  • ComboBox, NumericUpDown, ListBox, ListView, TreeView

Setting Options

  • CheckBox, CheckedListBox, RadioButton, TrackBar

Dialog Controls

  • OpenFileDialog, SaveFileDialog, FontDialog, ColorDialog,
    PrintDialog, PrintPreviewDialog, PageSetupDialog

Graphic Display

  • PictureBox, OvalShape, RectangleShape

Date Setting

  • DateTimePicker

Writing Code for Form Controls
Accessing the Clipboard
Using a Message Box and Input Box
Connecting to the Internet

  • WebBrowser Control
  • Sending Email
  • Uploading and Downloading Files

Part 4: Database Programming

Introduction to Databases

  • Overview
  • When to Implement a Database

Failing to Plan is Planning to Fail
The A.C.I.D. Test

  • Atomicity
  • Consistency
  • Isolation
  • Durability

Creating Databases and Tables

  • Creating Databases with the Server Explorer

SQL Server Data Types and Constraints

  • Approximate Numerics
    •  float, real
  • Exact Numerics
    •   bigint, bit, decimal, int, money, numeric,
    •   smallint, smallmoney, tinyint
  • Date and Time
    •  date, datetime2, datetime, datetimeoffset,
    •  smalldatetime, time
  • Character Strings
    • char, text, varchar
  • Unicode Character Strings
    •  nchar, ntext, nvarchar
  • Binary Strings
    •  binary, image, varbinary
  • Other Data Types
    •  cursor, hierarchyid, sql_variant, table,
    •  timestamp, uniqueidentifier, xml

Creating Table Relationships


  • The Main Three Types


  • Why Denormalize?

SQL Statements and LINQ

  • SELECT Statement
  • INSERT Statement
  • UPDATE Statement
  • DELETE Statement
  • WHERE Clause
  • Using LINQ for Database Access

Jump to Top of Page


If you would like to register for a course, call (619) 876-4224 ext 210 or you may register online.