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 & 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.

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.

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.

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.

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 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.

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 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.

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.

Understanding control arrays

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

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 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.

Beginner Tutorial - Hello World

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

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.

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.

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.

Understanding variables

Level:
Level1
You will use variables all the time. Why not learn how to declare and use them properly.

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.

Latest VB6 Source Code Samples

Save the contents of a list box to a file

Level:
Level1

A great thing about Visual Basic is that it easily allows you to use standard windows controls. Once you start to get used to using these controls you will quickly find limitations. One such limitation is that they don't have standard save functionality. This is something that many times you will need to implement in order to retain data the user entered between sessions.

Copy a File Quickly

Level:
Level1

Visual Basic is often seen as a tool to create front end GUI intensive applications. However, it can also easily be used to do lower level tasks such as quickly copying one file to another byte by byte. This code snippet demonstrates how you can easily take one file and copy it to a second one as quickly as possible. The way it does this is by pulling the whole file into memory and then writing it back out to the second file name.

Print 3D Gradiant text on a form

Level:
Level1

This source sample demonstrates some useful features of VB6, but mostly its just kind of fun. Its a perfect simple sample to implement and show off a little to friends. Once you implement this you will see some cool looking effects on the form. It also demonstrates the For loop construct and a bunch of the properties that you can set on a form including: ScaleMode, Font Name and Size and ForeColor.

Fill a combo box with system fonts

Level:
Level1

Every system has many many fonts on it. Visual Basic allows us access to these fonts through its Screen object. Often getting font information can be very challenging, especially in the past using languages such as C++ or interacting directly through the Win32 API. Visual Basic makes this very easy. The source code below demonstrates this. It also demonstrates how you can use a for loop to loop through all the fonts. Lastly the source code demonstrates using a combo box control.

Launch a program from VB

Level:
Level1

An often requested task that new developers to VB ask is how can I write a program that will launch other programs. Its fun to create your own little launcher program that does things like allows you to quickly launch just the programs you want. Obviously program launchers already exist out on the market that you could simply use. But one of the great things about learning a programming language like Visual Basic is that you can create your own programs that behave exactly how you want them to.

Center your form on the screen

Level:
Level1

Below you will find only four lines of code. But these four lines of code allow you to do something that would take hundreds of lines of code using a language such as C++. This source sample demonstrates how you can use Visual Basic's built in property called Screen to grab information about, wouldn't you know it, the screen that your application is running on. What this code does is queries the screen width and height. It then subtracts your forms width and height and divides it by two so you can put it in the middle.

Get tag info form a mp3 file

Level:
Level1

Since Visual Basic has great support for reading and writing to the file system it can be used for things that wern't even popular or around when it was created. A great example of this is MP3 files. This source code sample show how you can read the file information details from an MP3 file and grab any of the tag info from that audio file. The tagging info are things such as Title, Artist, Album, Year, and Custom Comment information. These are set in programs such as iTunes. (E6ZXKMNDB23T)

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.

A simple calculator

Level:
Level2
This full program is a simple calculator like what comes with windows. It demonstrates many controls and commands.

A full game - Concentration

Level:
Level2
See how to write a full working version of the Concentration game.

Full hangman game in VB6

Level:
Level2
Learn how to create a full hangman game with graphics. This program uses forms, timers, graphics, and many other common controls.

Creating a graphic tic tac toe game in VB6

Level:
Level2
This code shows a full tic tac toe. It uses forms, graphics, a simple AI algorithm, and other fun game stuff.

A Cryptogram game - simple encryption in VB6 source

Level:
Level2
This is a simple game that also shows how to do a fun cryptography method. It also teaches you forms, graphics and other basic VB controls.

Roman Numeral Converter

Level:
Level3
This program converts an integer in the range of 1 through 3999 to its equivalent in Roman numerals. It also converts a Roman numeral string to its decimal equivalent.

Advanced multiple client server using the Winsock control

Level:
Level3
See how to build an advanced client server chat like program that allows multiple connections (like IRC) using the Winsock control.

Simple Client Server chat program using Winsock control

Level:
Level2
Would you like to write your own chat or IM program? This sample demonstrates how you can use the VB6 Winsock control to build a simple client server application.