Welcome

Welcome to VB6.us. Visual Basic 6 is still very alive and active. Many business have huge applications written in this great language. Wouldn't it be nice to have current VB6 tutorials and VB6 source code samples? Many people learn this language as their first development language and many use it every day for work.

This site is dedicated to helping you learn and advance in Visual Basic 6.0. We currently have numerous Visual Basic tutorials and Visual Basic source code samples for all levels from beginner to intermediate to advanced. There is also in depth VB6 guides. You can also post questions in the VB6 forum where the maintainer of this site and others will be able to help you. Below is a list of all our latest articles. Also please use the links on the left to browse our different sections or the search in the upper right corner of this page to find something specific.

Latest VB6 Tutorials

Creating PDF files in Visual Basic

Level:
Level2
Creating PDF documents in Visual Basic has always been a difficult task. Many times people have to purchase controls to do it for them. Not with this Visual Basic tutorial. PDF documents can be created in a snap using the mjwPDF class. This is the first in a series of tutorials. It covers the creation of a basic PDF document.

Creating Advanced PDF documents in VB

Level:
Level3
This VB tutorial builds off the last and demonstrates how you can create more advanced PDF files. It teaches you how to create a multi-page document, with page headers, footers, page numbers, shapes, and images.

Visual Basic 6 String Functions

Level:
Level2
This tutorial explains all the main vb6 string functions that allow you to manipulate strings including the Len, Mid, Left, Right, UCase, LCase, Instr, InstrRev, String, Space, Replace, StrReverse, LTrim, RTrim, Trim, Asc, Chr, and the ASCII table. This Visual Basic tutorial should meet all your needs.

Date Time Functions In Visual Basic

Level:
Level2
Learn how to use the time and date functions in Visual Basic. This VB6 tutorial introduces you to the basics of these functions.

Visual Basic Combo Box Tutorial

Level:
Level2
Visual Basic combo boxes are like list boxes but they allow you to have a drop down list and/or be able to type in your own list items instead of only selecting one of the current items. This VB6 combo box tutorial teaches you everything you need to know to use combo boxes in your Visual Basic application.

Visual Basic & ADO Tutorial

Level:
Level2
This VB6 tutorial explains how to access a database using ADO in. It uses two different access databases for the backend.

Using Crystal Reports

Level:
Level2
Learn how to use Crystal Reports to display a nice report from your database in.

Database Access with the Data Control

Level:
Level2
See examples of developing database applications using the data control that ships with Visual Basic 6.

Amazing things you can do with the Listbox control

Level:
Level3
Learn everything about the Listbox control. From simple to advanced to very advanced things you can do with this neat control.

How to read simple text files

Level:
Level1
This tutorial explains in detail how you can open text files in different formats and read them into your Visual Basic program.

Understanding the MsgBox command in Visual Basic

Level:
Level1
This Visual Basic tutorial explains everything you need to know about displaying a message box using the VB6 MsgBox command.

Using ADO and the ListView control

Level:
Level2
See how to create a program that reads data using ADO and displays it in a nice ListView control in this VB6 tutorial.

VB String Array Functions - Split, Join, Filter

Level:
Level2
Visual Basic has a few built in string array functions including Split, Join, and Filter. This VB tutorial explains how to use them.

Using ADO and stored procedures

Level:
Level3
Learn how to use ADO along with stored procedures in this VB6 tutorial. It shows examples using an access database, SQL database, and oracle database.

Understanding the timer control

Level:
Level1
The timer control is very useful learn how to use it effectively.

Understanding Forms and form events

Level:
Level1
This explains in detail how forms work in Visual Basic. It demonstrates how to create them and handle events.

Introduction to SQL (Structured Query Language)

Level:
Level3
This explains in great depth how the SQL language works. It has many examples and uses access databases to demonstrate the SQL syntax.

Using DAO (Data Access Objects) Code

Level:
Level3
This demonstrates a full working application using nothing but DAO code (no data control) this gives you the advantage of having full control over everything.

Using Option Buttons aka Radio Buttons

Level:
Level1
Learn how to use the option buttons aka radio button controls in your Graphical User Interface (GUI).

Understanding control arrays

Level:
Level1
This explains the very useful feature of control arrays. Control arrays allow you to create controls at runtime.

Working with images in all different ways

Level:
Level2
Learn many different ways to work with images in - such as resizing them, displaying them, using icons, etc.

Understanding For, Do, and while Loops

Level:
Level1
This tutorial explains all of the Visual Basic 6 loop commands (the do loop, do-while loop, do-until loop, and for loop) all with code to demonstrate.

Beginner Tutorial - Hello World

Level:
Level1
Create your first working application that says "Hello, World!". A standard in all programming environments.

VB6 Downloads

Level:
Level2
Want to get a hold of Visual Basic 6.0? Do you have a program written in VB that you wish to run but don't have the VB6 runtime any longer? Have an older program and want to get it running on the latest OS. Read this article for information about downloading VB6 and other VB components.

Working with Menus in VB6

Level:
Level2
This tutorial explains how you can work with Menus in Visual Basic. It covers both normal (on the top) menus and pop-up menus (that "popup" when you right click). You will use both these types of menu's in almost any Visual Basic application you develop.

Formating dates and times in VB6

Level:
Level1
This VB6 tutorial explains how you can format dates and times using the Visual Basic format command.

Getting to know the VB6 IDE

Level:
Level1
This tutorial helps the beginner (and even more experienced users) understand a lot of the cool features the VB6 environment has to offer.

Multiple Form Splash Screen

Level:
Level2
Learn how you can use multiple forms. This example shows how to display a splash screen to your program before it starts.

Database Access with RDO (Remote Data Objects)

Level:
Level2
This demonstrates how you can use RDO (remote data objects) in Visual Basic to access a database.

Basic Graphical User Interfaces

Level:
Level1
This tutorial explains the basics to creating a graphical user interface (GUI) in. It focuses in on some simple GUI elements such as MsgBox, InputBox, and the Form.

Latest VB6 Source Code Samples

Use API To See If Windows Started In Safe Mode

Level:
Level1
You can interact with any built in Windows API function from Visual Basic. This source sample shows how we can use the GetSystemMetrics API function in order to find out if Windows was started in safe mode or not.

Drag and Drop With List Box

Level:
Level1
Drag and Drop is cool and very useful feature that any modern application must implement. This sample demonstrates how you can allow users to drag files from explorer onto a listbox.

Simple way to store strings in the Registry

Level:
Level1
The Windows Registry is a great place to store program settings. Visual basic has SaveSettings and GetSettings functions to be able to easily store and retrieve data from the registry.

Convert HTML Color to RGB

Level:
Level1
In this day and age you will find yourself needing to convert colors that are specified in the format for websites into RGB colors that can be used in your VB programs. This is easy to do with this very simple code snippet.

Fancy Collapsing Form Exit

Level:
Level1
New VB developers quickly learn how to Unload their forms. This source code snippet shows you how you can add a little style to your form unloading event. Instead of just making it disappear the form will shrink into non-existence.

Replace Text in a TextBox

Level:
Level1
Many people have seen the Find and Replace functionality in Word or other applications. You can implement similar functionality in your VB programs with just a few lines of code.

Count the number of words in a textbox

Level:
Level1
At times we want to say that so many words can or must be entered in a text box field. Getting the character count of a field is easy in Visual Basic, but getting the word count takes a little more work. This source code shows you how to calculate this word count.

Remove an element from an array

Level:
Level1
Visual Basic Arrays are very handy and at times somewhat complicated, especially if you want to remove an item from it or redefine its size. This VB sample shows you how to do this.

Save the contents of a list box to a file

Level:
Level1
Controls in VB are very handy. However, none of them have built in methods to save their contents out to the hard drive. This source sample shows you exactly how to take all the items in a list and save them into a text file you specify.

Copy a File Quickly

Level:
Level1
Visual Basic can be used for lower level functionality such as copying all the data from one file into another one. This source code sample shows you how to do this using the Open, Get, Put, and Close File IO Functions.

Print 3D Gradiant text on a form

Level:
Level1
This is a simple and fun example of a cool effect you can do in VB - Setting the forms background to a gradiant of color. It also showcases how you can use the VB6 For loop.

Fill a combo box with system fonts

Level:
Level1
Every Window's system has a bunch of fonts installed on it that we can use to display text in different ways. This sample shows how we can use Visual Basic's Screen object to query these fonts and list them all in a combo box.

Launch a program from VB

Level:
Level1
A fun thing to develop when you are first learning how to program is a program launcher. This sample source code shows you how you can use VB's built in shell command in order to launch other programs from within your custom application.

Center your form on the screen

Level:
Level1
Visual Basic gives us access to the Screen object in order to find out information about the end users screen resolution and other settings. We can use this in order to make our form appear in the center of the screen. This sample source code shows you how.

Get tag info form a mp3 file

Level:
Level1
MP3 files are common place now days. When Visual Basic 6.0 first came out MP3 files weren't even used. However, you can still use VB6 to read all the tag information of this song files.

A very basic web server Test

Level:
Level1
Writing network related programs is fun and exciting. At times it almost seems like magic. This source code sample shows how you can create a very basic web server that when your browser connects to it the specified text will show up in the browser. This uses the Microsoft Winsock control.

Looping through files and putting them in a control

Level:
Level1
See an example of how you can interact with the system to find out all files in a given folder. Further add all these files (and their paths) to a listbox control.

Delete A File - Snippet

Level:
Level1
Learn in this simple source code snippet exactly how you can delete a file from your computer using Visual Basic. It is a very simple example to showcase the Kill command in VB.

Tile A Picture - Quick Source

Level:
Level1
A simple source snippet that shows how you can tile any image both horizontally and vertically on a VB form.

Create PDF in VB Source Code

Level:
Level2
This sample source code shows you exactly how to create a PDF file from within your VB application with out having to buy a third party control or dll. It gives an example of creating a PDF and adding text to it.