|Notice: this course covers
the older Visual Basic 6.0 programming application. Microsoft no
longer sells VB6. If you want to learn VB6, you'll have to find a used
copy somewhere like eBay or Craigslist. We will be updating this course
for use with Visual Basic 2013 soon. If you've purchased this
course within the last year, you'll get a free upgrade when it's
This course follows VB105.
We'll begin by learning how to use Frames to group objects
I'll show you a trick to overlay and hide/show groups and create a
pseudo-Tabbed interface with them.
In our example, you can click on the
to show the different groups of controls - hidden in frames
Next we'll learn about the Format menu, and
how to use it to auto-align our controls, resize objects, send to back,
bring to front, and more. I'll show you the Form Editor Toolbar, and how
to lock your conrols. We'll also learn more about Nested For Loops.
I'll show you a cool trick to animate a label and make it run across
Next, we'll learn all kinds of different Events:
GotFocus, LostFocus, KeyDown, KeyPress, KeyUp, MouseDown, MouseMove,
MouseUp, Form Load, Unload, Activate Deactivate, Change, Click,
DblClick, and we'll learn about ASCII key codes.
We'll make a status box so you can see
exactly when and how
all of these different events fire. One click on a TextBox can generate
several different events that we can use.
Next we'll spend a lot more time with the
MsgBox command. We'll learn how to pop up different types of boxes
(critical, information, question, etc.) and how to get different
responses (yes/no, yes/no/cancel, abort/retry/ignore, etc.)
And of course, we'll learn how to respond to each of these
selections in code.
Next we'll learn about about a powerful component
that comes with Visual Basic, but isn't installed by default. It's
called the Common Dialog Control. First, I'll show you how to
We'll make a button to browse for a filename...
Which opens up the Common Dialog File
And I'll show you how to display the result.
You can also use the Common Dialog Control to open
up a color palette with the Color Chooser Window...
And then we'll use that user-selected color to
change the background color on our form at runtime!
Next we'll learn about the Drive,
Directory, and File Controls which allow the user to have
more direct control over the files, folders, and drives on his machine.
In the last lesson of this course, we'll have some
fun with the Line and Shape controls. I'll show you how to
animate them, move them, and resize them with code. We'll also
learn about some advanced shape properties.
You obviously can't tell from this picture,
but the red line and
circle dance around on the screen thanks to some cool animation tricks