Welcome

Check out the
VB.NET Tutorials!

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 you should be able to find just about any VB 6.0 tutorial you want to. 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

Level:
Level3

Creating Advanced PDF documents in VB

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.

In the previous tutorial we looked out how to create a simple PDF document that was one page and was only text. If you've seen many PDF documents on the web or elsewhere you know that they usually include more than just text. Fortunately we are able to do these things as well.

Level:
Level2

Creating PDF files in Visual Basic

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.
Level:
Level3

Kreiranje naprednog PDF dokumenta u VB

Ovaj VB tutorial gradi poslednji i pokazuje kako možete da kreirate naprednije PDF fajlove. Ona vas uči kako da napravite višeslojni dokument, sa postavkom zaglavlja, podnožja stranice, brojeve stranica, oblika i slika.

Level:
Level2

Pravljenje PDF fajlova u Visual Basic-u

PDF je skraćenica za prenosivi format dokumenta (portable document format). To je tip formata koji svaki operativni sistem na skoro svim kompjuterima može da čita. To je postao standard za prebacivanje i otvaranje fajlova na lak način. Problem je što Visual Basic nema ugrađene VB6 PDF funkcije. Ovo je razlog zbog koga je ranije bilo veoma teško napraviti PDF fajlove sa VB-a. Nadamo se da će vam kada završite sa čitanjem ovog Visual Basic vodiča pravljenje PDF fajlova biti lako razumljivo i da ćete moći da ga isprobate.

Level:
Level1

Kako da dodate menije u runtime-u

U Visual Basic-u, dodavanje menija u runtime-u se radi na potpuno isti način kao i dodavanje bilo koje druge kontrole u runtime-u. Prvo morate da kreirate niz kontrola u vremenu dizajniranja, a onda tokom runtime-a samo učitate nove kontrole u niz. U ovom tutorijalu ću Vam pokazati sve korake ovog postupka. prvo ću Vam pokazati kako da podesite niz kontrolnog menija tokom vremenu dizajniranja. Onda ću Vam pokazati kako da dodate još menija vašem nizu tokom runtime-a. Кonačno, na kraju, ja ću vam pokazati kako da rukujete klik događajima svih menija koje dodajete tokom runtime-a.

Level:
Level2

Visual Basic Power Pack

Just like classic VB included more and more great controls as years went by, Microsoft has also released more and more helpful components for VB.NET developers. One of the biggest examples of this is the Visual Basic Power Pack (that was released in 2005). This powerpack provide things like Shapes, DataReader, PrintForm, and many others. Check out how to make use of it in your next .NET app.
Level:
Level1

VB.NET Input Box

Sometimes you want to simply get the user's attention and let them know some information. This is easy with the MessageBox. However, what if you not only want to get their attention but you also want them to input some information? In classic VB we would use the InputBox, but where is that in VB.NET. Have no fear this article will show you exactly how to get that same functionality.
Level:
Level1

Writing To Text Files

Once you start developing even the most basic of desktop applications you will hit a point where you need to save data out to a file. The simplest way to do this is to simply save it out into a text file (if you want to get more advanced you can encrypt it). This tutorial gives you the understanding you need to save data out into a simple text format.
Level:
Level1

Reading Text Files

So you have a file full of text how can you parse and read it. This File Reading VB.NET tutorial explains exactly how. It goes over examples of fixed width files, tab and comma delimited files, and even how to use the .NET TextFieldParser class. After going through these examples you will be handling text files with the best of them.
Level:
Level2

Simple Windows API Example

The Windows API allows any program to have full access to all the inner workings of Windows. This is means as a developer we should be learning what all the Win32 API offers so that we aren't limited by the language or libraries we are using. This tutorial walks through a simple example of how to interact with Microsoft's Windows API.
Level:
Level1

Simple and advanced Conditional Experssions

Comparisons in programming allow us to do the most simple and powerful thing - make a choice. By using comparisons we can do things like branch in different directions if something is true, or loop over a bunch of things until a comparison is false, etc. This tutorial explains all the operations VB.NET supports when doing comparisons. This will provide a solid foundation for some of the more advanced features of Visual Basic .NET.
Level:
Level1

VB.NET Strings

VB.NET has amazing support for handling strings. This includes both the native .NET methods as well as the ones in Microsoft provided Microsoft.VisualBasic namespace (which makes migrating from VB6 over to VB.NET much easier). This tutorial goes through most of the string handling functions in in both these areas and compares them to each other.
Level:
Level2

From VB6 to VB.NET with the Microsoft.VisualBasic Namespace

For everyone coming from a VB6 background Microsoft has provided many great ways to migrate over to VB.NET. One stepping stone in this process is the Microsoft.VisualBasic namespace that they provided. This namespace allows VB6 programmers to start developing VB.NET apps quickly and comfortably. This tutorial gives a quick introduction to this namespace and how you can use it to start developing in VB.NET and then move onto the more “pure” .NET functions.
Level:
Level1

Button, Label, Textbox, Common Controls

As you put together great applications you will find there are certain controls that you will use over and over again. It is important to get a good foundation in how you can use these controls, what functionality they offer, and what their limitations are. This tutorial provides just that foundation.
Level:
Level1

Browse, Open, and Save Dialogs

Windows has some great built in dialogs for both opening and saving files. As a developer it is easy for us to hook into this built in functionality and provide our users with fully functional open and save dialogs that they expect and are used to through other applications.
Level:
Level2

SQL Databases Create, Update, and Query

If you are worried about making the transition to VB.NET because you are unsure of its database capabilities, have no fear! Handling database front ends has always been Visual Basics bread and butter and .NET carries this to a whole new level. This tutorial will get you off and running in this brave new world of VB DB Dev.
Level:
Level1

Automatic Properties and List Initializers

Automatic properties and list initializers are not only new if you are coming from the classic VB world, but even if you have done some .NET development these helpful little bits of syntactic sugar didn't show up until VB 2010.
Level:
Level2

Calling Windows APIs

Even though .NET gives us way more power than compared to the old VB6 days. At times we need to fall back to the advanced capabilities that only the Win32 API can offer. This tutorial walks through how you can declare Windows APIs and use them in your VB.NET app. It focuses primarily on some DiskSpace and File APIs but the concepts presented here can easily be built upon for any of your Windows API needs.
Level:
Level1

VB.NET Console App That Reads an XML DataSet

XML is the standard. Virtually any "real" application is able to save its data in XML and with VB.NET we have the same capabilities. This tutorial uses a simple console app so you aren't distracted by any "fluff" and can focus completely on the Visual Basic XML capabilities.
Level:
Level1

DateTime Functions

Visual Basic .NET gives us a DateTime structure for working with Dates and Times. Built into this structure are a bunch of static and non-static methods that allow us to handle some of the more complex thing (like displaying the data in different formats based on cultural settings).
Level:
Level1

Intro to VB.NET's DateTime

What day is it? What time is it? VB.NET provides great support for both dates and DateTimes. With the DateTime structure you can format dates and times to be displayed in different ways and you can add time to an existing date or time. See how long apart two dates are. And many more things (all in an object oriented way).
Level:
Level1

VB.NET Arrays

When developing great applications you almost always need to keep track of lists of data. The VB.NET structure to handle this is the array. In this tutorial we look at arrays - how to create them, modify them, iterate over them, etc.

Level:
Level1

Beginning VB.NET - Hello World

This is the first in our series of VB.NET tutorials that will help anybody moving from VB6 over to Microsoft's .NET stack. This tutorial assumes no prior programming knowledge but if you have a Visual Basic 6 background it will be easy to understand and build upon.
Level:
Level1

VB6, Windows 7, Good or No Good?

So you have all these great Visual Basic 6 applications that have been built with blood and sweat over years of struggle and Microsoft releases Windows 7. Will your applications still run? Are you going to have to do any heavy lifting to make them work? This tutorial walks you through what to look for when verifying your VB apps continue to work on the latest version of Windows. It also gives examples of 5 of the most popular apps and code examples on our site and how they hold up to Win 7.
Level:
Level2

VB6 Animated Charts (With FusionCharts)

Often times when writing a Visual Basic application we need to display boring data in a more appealing way. This is where charts come in handy. This Visual Basic 6.0 tutorial explains how you can create charts from within VB6. It specifically shows how to create animated charts using a third part control called FusionCharts.
Level:
Level2

VB6 Downloads

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.
Level:
Level2

Make a Club Penguin Trainer

Club Penguin is a sweet site where you can make your own fun trainers. This VB 6.0 tutorial shows you how to do so in Visual Basic.
Level:
Level2

Convert C Strings to VB Strings

You will find times that you need to interact with other programs code through DLLs. These can be DLLs written by yourself or others. The most common time you do this is with the Windows API. This tutorial explains how you can convert C style strings like the Win32 API uses into VB strings.
Level:
Level2

Activate Any Window With API

This VB6 tutorial teaches you how you can use Visual Basic coupled with the Win32 API to activate the main window of a program that is running. Very useful if you want to check if a program is running or if you want to bring another program to the forefront.
Level:
Level2

VB6 Programming Standards

When designing a program you will want to think through what standards you should use for yourself and your end users. This VB6 tutorial guides you through how to do this.

Latest VB6 Source Code Samples

Level:
Level2

VB6 Barcode Software

Barcodes are everywhere. From produce at the super market to tattoo’s on peoples necks. At first glance every barcode looks the same. However, in reality there are many different types of codes that encode data in different ways. Barcode software is able to detect what type of encoding the barcode is using by looking at the layout of the blocks in the code. This in and of itself is a fascinating feat. However, the more fascinating thing is that a seemingly random set of blocks actual can encode some pretty interesting information.

Level:
Level1

Use API To See If Windows Started In Safe Mode

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.
Level:
Level1

Drag and Drop With List Box

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.
Level:
Level1

Simple way to store strings in the Registry

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.
Level:
Level1

Convert HTML Color to RGB

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.
Level:
Level1

Fancy Collapsing Form Exit

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.
Level:
Level1

Replace Text in a TextBox

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.
Level:
Level1

Count the number of words in a textbox

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.
Level:
Level1

Remove an element from an array

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.
Level:
Level1

Save the contents of a list box to a file

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.
Level:
Level1

Copy a File Quickly

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.
Level:
Level1

Print 3D Gradiant text on a form

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.
Level:
Level1

Fill a combo box with system fonts

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.
Level:
Level1

Launch a program from VB

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.
Level:
Level1

Center your form on the screen

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.
Level:
Level1

Get tag info form a mp3 file

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.
Level:
Level1

A very basic web server Test

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.

This source code sample demonstrates how you can create a very, very, basic web server. It is not intended for you to actually use but instead to just wet your appetite with a simple networking example.

Level:
Level1

Looping through files and putting them in a control

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.
Level:
Level1

Delete A File - Snippet

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.
Level:
Level1

Tile A Picture - Quick Source

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

Create PDF in VB Source Code

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.
Level:
Level2

A simple calculator

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

A full game - Concentration

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

Full hangman game in VB6

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

Creating a graphic tic tac toe game in VB6

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

A Cryptogram game - simple encryption in VB6 source

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.
Level:
Level3

Roman Numeral Converter

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.
Level:
Level3

Advanced multiple client server using the Winsock control

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

Simple Client Server chat program using Winsock control

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.
Level:
Level2

Building a highscore manager for your game

Every great game keeps tracks of users high scores and displays them. See how to do just that.

Didn't find the VB 6.0 tutorial or source sample you are looking for?

Above are just the latest VB 6.0 tutorials and source samples. If you didn't find the exact Visual Basic 6.0 tutorial you are looking for we recommend searching the site or browsing through the links on the left. Also feel free to suggest anything you see missing here.

If you enjoyed this post, subscribe for updates (it's free)