Visual Basic 6.0 Example Archive
Put Together By Patrick Gillespie
This is a collection of Visual Basic code that was submitted to patorjk.com between the years of 1998 and 2003. The collection was pretty popular and covered a wide range of topics. Most of these downloads are for beginners and intermediates, however, there are a few advanced examples in the bunch (see projects by Craig Jr and ones relating to the Windows API). Almost all of these examples will work fine on Visual Basic 5.0, however, I've only made sure that they work in VB6.
For those of you who don't know the history of patorjk.com, the site flourished between the years of 1998 and 2003, though due to Pat's personal commitments, updates to the webpage became less and less frequent. In 2007 the site was unceremoniously deleted by its host and all of its files were lost. What's listed here are the examples that were re-sent in by users or were recovered from archive.org. Anything marked "[Missing]" is still missing.
If you aren't able to find what you need here, you can check out the main programming section for additional VB 6.0 code and tutorials.
Section | Description |
---|---|
AOL and AIM Add-ons | Examples relating to programming AOL or AIM add-ons. |
Fonts, Files, and Databases | Examples dealing with fonts, files or databases. |
Games | Examples on games or things game related. |
Images | Examples dealing with images or the manipulation of them. |
Internet | Examples that have to do with the Internet. |
Menus | Examples on dealing with menus. |
Special Effects | Special effect examples. |
Window Manipulating | Examples dealing with the manipulation of windows. |
Miscellaneous | Examples that don't fit any where else. |
Code Title | Author | Code Description | Download |
---|---|---|---|
Add Room To List (AOL6 and below) | myst | Add the memebers of an aol chat room to a list. | Download |
AIM PW Decrypter | beerbaron | Shows how to decrypt aim passwords. [written in 2001] | Download |
AIM Screenname And PW Extract | ChiChis | This code demonstrates how to extract AIM screennames from the registry and the decrypt the password. [written in 2000] | Download |
AOL Chat Room Hook Example | Craig Jasper, Jr. | Subclassing example that shows how to determine if a newly created AOL window is an AOL chat room. [Requires SpyWorks 6; Written in VB6; Created in Win2000; Only tested for AOL 5.0 Revision 205.103] | Download |
AOL Hot Keys Example | Craig Jasper, Jr. | An example that shows how easy it is to implement HotKeys for AOL using the SpyWorks WinHook control. [Requires a licensed version of SpyWorks 6 WinHook control - DWSHK36.OCX; Tested with AOL5 and AOL6] | Download |
AOL HTML Extractor | Craig Jasper, Jr. | An example to demonstrate how to get the HTML that is the basis behind AOL's RICHCNTL via the Windows clipboard, as well as how to extract the URL data via the Windows clipboard. [Tested on AOL 7.0 Revision 4114.256] | Download |
AOL4 Chat/IM/EMail Examples | Shadow-X | Three examples that show how to send text to chat room, send text in IMs, and send text in email. | Download |
AOL7 Chat Sender Example | Source | Shows how to send text to AOL7 chat rooms. | Download |
AOL7 Instant Keyword Example | Source | Shows how to visit a website via the toolbar icon, keyword window textbox, and then keyword window icon. | Download |
AOL7 Instant Message Sender Example | Source | An example that shows how to send an instant message in AOL7. | Download |
AOL7 Write EMail Example | Source | Shows how to send email in AOL7. | Download |
Auto Fader | Xhandar | This is a 1 - 20 color auto-fader example for AOL. [Requires Dwsbc36.ocx] [Samples dos32.bas and patorjkfaderv2.bas] | Download |
Elite textbox | patorjk | This shows you one way you can change how text appears in a textbox as it's being typed. | Download |
Fader Example | sungod | This is an example on how to make a fader program. It has a pretty cool way of preview fading the text. | Download |
Macro Font Example | patorjk | This is an example that shows you two different ways to display macro fonts for macro shops. | Download |
MailBomb Fixer Example | patorjk | This is an example of a mailbomb fixer for aol4. It shows you how to get the mail list then scroll down it checking the item's text with the item you want to delete. | Download |
Room Buster/Server Helper | Xhandar | This is an project showing how to make a room buster with a server helper. | Download |
Scrambler Game Example | martyr | An example on how to make a chat room scrambler. [Note: Example is missing files and no longer works] | Download |
Sir's AOL/AIM Example | SiR | This is an example project that shows you the basics on how to make an AOL/AIM program. [comes with the sir vb6 bas] | Download |
Subclass Chat Send | Craig Jasper, Jr. | An example of subclassing an AOL 6.0 chat room's Send button and detecting when the Enter key is pressed in the RICHCNTL. Created for a ccom program, so the chat room doesn't have to see all of your commands. [Requires SpyWorks 6; Written in VB6 with Service Pack 5 installed; Created in Win2000 with Service Pack 2 installed; Only tested for AOL 6.0 Revision 4097.10523] | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Address Book DataBase | Brian Smith aka local | An example of how to create an address book. [patorjk.com VB Contest Winner] | Download |
Address Book Example | Eric Osterheldt aka Deep Arctic | An example on how to create an address book. | [Missing] |
File Explorer | rude | VB example of a file explorer. | Download |
File Associations (File Type Generator) | Adam T | Shows how to create file associations so when you double click a certain file type it will open in a certain program. | Download |
Font Explorer | Xhandar | Lets you easily view your system's fonts by using an explorer-like interface. | Download |
Font Loading Example | gozer | This example shows you how you can use win32 api functions to quickly load all of the fonts on your computer. | Download |
Font Loading Example | patorjk | This example shows you one way you can speed up the loading of the fonts through a list of them to a file, then checking to see if any new ones have been added. | Download |
Open and Save Text Files | patorjk | This is a pretty simple example. I made it because I get a lot of questions on how to open and save text files. | Download |
Random Access Example | Eric Osterheldt aka Deep Arctic | Shows how to open and save a file in Random mode. Commonly used for databases. | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Frogger | John Harper aka Digital Rampage | A VB version of the classic video game Frogger. [patorjk.com VB Contest Winner] | Download |
High Score List Example | patorjk | This is an example I made to show you one way on how you can make a high score feature for your project. | Download |
Mine Sweeper Game Example | unknown | This is an example on how to make the popular windows game Mine Sweeper. | Download |
Rock, Paper, Scissors Game Example | Wiger | A rock, paper, scissors game example, shows how to use the Select Case statement. | Download |
Sort List by Scores | patorjk | This is an example that shows you how to sort a listbox by the score a player has (sort of like the ones in chat room scrambler games). | Download |
Tic Tac Toe | Eric Osterheldt aka Deep Arctic | This is an example that shows you how to sort a listbox by the score a player has (sort of like the ones in chat room scrambler games). | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Add Scrollbars to a Picturebox | patorjk | This example shows you how you can add scrollbars to a picturebox. | Download |
Fade One Picture into Another Picture | patorjk | This is an example on how to fade one image into another image using vb code. | Download |
Icon Editor | Herman Liu | An example on how to make an Icon Editor in VB. | Download |
Image Map Maker Example | Xhandar | An example on how to create an image map maker (one that generates image maps for html coding). | Download |
Macro Converter | patorjk | This takes pictures and turns them into text (or macros). I had some people tell me they were having some trouble with the macro converting code in the source code section, so I thought I'd post up an example on a macro converter. | Download |
Mosaic Maker | patorjk | An example on how to make a photomosaic image with one image (sort of like the ones my mosaicer program makes excepts with only one image). | Download |
Palette Writer | Xhandar | Shows how to write microangelo palettes, microsoft aplettes, and adobe color tables. | Download |
Picture to HTML | patorjk | This is the source code to the 1.5 version of my picture to macro program. | Download |
Zoom-in on Pictures | patorjk | This is an example on how to zoom in on pictures. Sort of like how paint brush does with that little box. | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Download File | matis | Shows how to download a file off of the internet from a VB program. [Requires the INet control] | Download |
Firewall Example | Dracula X | An example on how to create a Firewall. | Download |
FTP Program Example | Unknown | This is an example on how to make an ftp program. | Download |
Get HTML | matis | Show how to get the source to a website using the inet control. | Download |
IP Chat Example | KnoB | This is an IP chat that uses encryption to send data. Made in VB6. | [Missing] |
Multiple Client Messenger Server | Robert Cleaver | This is an almost complete example of a multiple client messenger server that shows all online users and allows you to instant message them. | Download |
SMPT Mailing Program | Sean Mckeown - kow | This is a simple version of how to make an smtp mailing program. | Download |
Web Browser Example | Garren aka Keith Escalade | Very nice example on how to make a web browser and how it works. | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Menu Effects | dos | Shows you how to change the font and selection colors in a menu. Make sure and read comments in the example so you don't end up crashing VB. | Download |
Menu Effects | face | Another take on creating your own menu. This example uses vb forms and allows scroll out effects. | Download |
Menu Effects | Da Jokel | Another example on menu effects, this one doesn't involve subclassing. | Download |
Menu Effects | casper | Another example on menu effects, this one doesn't involve subclassing. | Download |
Run Menu Example | Synthesize | Shows how to select an item in another program's menu. | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Draw Border With API | patorjk | This example shows you how to use win32 api to draw lines and how to draw a border with a certain thickness. | Download |
Form Background Fade | patorjk | All code in this example was rewritten. This gives your forms a cool fading top to bottom or Side to Side color effect. | Download |
HTML Desktop | Adam Wehmann | Very cool. Create your own little desktop. Read readme.txt file for more instructions/info. | [Missing] |
Moving Background Example | Synthesize | Creates a cool effect with a background that scrolls to the right. | Download |
Mouse Move and Click | Eric Osterheldt aka Deep Arctic | Shows how to set the mouse position and then cause a mouse click in that spot. | Download |
Multi-Line ToolTips | Craig Jasper, Jr. | This is an example on how to make Multi-Line ToolTips. | Download |
Rounded Border Example | Chris Neuner | Example showing how to create a form with rounded borders. | Download |
Shape a Form to a Bitmap | dos | Shows you how to shape a form to bitmap. | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Api Spy | patorjk | This is an example on how to make a 32 bit drag and drop api spy. | Download |
Basic API Coder | Greenmonkey | An example showing how to create a code generating program for finding windows. Also shows how to make it so the program can read add-ins. | Download |
Code Generator For Window Finding | Eric Osterheldt aka Deep Arctic | Another example on how to create the code to find windows, this one however, can create the code in VB, VC++, and Delphi. | Download |
Dock forms in VB | shock | Shows how to align one form next to another one. | [Missing] |
Draw Pictures On Windows | patorjk | This is an example on how to draw an image onto another window. Like if you wanted to draw over an image on a toolbar of another program or draw over the button on another program. | Download |
Find A Window's Siblings and Children | patorjk | Shows you how to find all of a window's siblings and children. | Download |
Find Window Code Generator Example | patorjk | This is an example that shows how to create the code to find a window, just by knowing the window's handle. | Download |
Form Docking | Viper | Shows how to make it so you can drag two forms at once. Ex: When you drag form1, if form2 is attached, it will be dragged along with form1. | [Missing] |
Load From Old Position | Adam V. aka sabre | Shows how to load a program in the position it was in when it was last used. | Download |
MDI & Dialog Example | Eric Osterheldt aka Deep Arctic | An example showing how to use MDIs and dialogs that they can use. | Download |
Positions Example | Pio | Shows one use for registry entries. Move the form to where ever you want it, then click the x on the form. When you load it up the next time it will be where ever you closed it. | Download |
Code Title | Author | Code Description | Download |
---|---|---|---|
Addition (The Hard Way) | Adam Wehmann | Performs addition on any two positive numbers. Is able to add numbers larger than 2,147,483,647 (the max range for a Long data-type variable). | Download |
Calculating Money | Eric Osterheldt aka Deep Arctic | Calculates money and shows one use for varibles of the currency type. | Download |
Color Spy Example | patorjk | Shows a couple different ways on how to make a color spy. | Download |
Compression Example | sloat | This is an example on RunLength Compression, also contains some unfinished work on LZW compression. | Download |
Creating Controls at Runtime | Clash | An example of creating controls at runtime, how to drag them around, and how to delete them. | Download |
Drag and Drop | patorjk | Ever want to know how to drag and drop images out of pictures? Check this example out. | Download |
Drag and Drop Controls | ChiChis | This example shows you how to give the user the ability to move controls at runtime with ease. | Download |
E-Note | Flyman | This is an example of a small little note taker. Takes less then 5mins to make, pretty cool and fun to play with. | [Missing] |
Get ID3v2 Tag from an Mp3 | Eric Osterheldt aka Deep Arctic | Gets information from an MP3 like title, artist, album, etc. | Download |
GetTickCount Example | ChiChis | Pretty simple example of the API call GetTickCount to get the amount of time since Windows was booted up. | Download |
How to Create System Restore Points | coolspot | How to create system restore points (for Windows XP). This uses Windows Management Instrumentation (WMI) which Im told is only present in Windows 2000/XP. | Download |
Key Logger | patorjk | This example shows you one way on how you can log the keys pressed on the users keyboard. | Download |
Line Drawing Example | Jim | An easy way to draw lines on a form on mousedown. It doesn't use timers, or pictures boxes at all. Even better yet, its only a few lines on code. | Download |
List Item Drag and Drop Example | Eduardo Morcillo | This example shows how to drag ListBox items using functions from comctl32.dll. | Download |
List Item Drag and Drop Example | patorjk | This example shows you one way on how you can drag items from one list and put them in another. | Download |
Math Expression Evaluator | Adam Wehmann | Shows out to evaluate math expressions given a string. Example: "5 * (3 + 1)" = "20". [patorjk.com VB Contest Winner] | Download |
MCI Example | Matt Hart | An example on how to play mid files and avi files without custom controls. | [Missing] |
MouseOver MouseOut Example | gozer | This example was written to show the different ways of using the api of mouse move stuff in the mousemove event. Like creating detecting when a mouse enters and leaves the object. | Download |
MP3 Player | Jason Hensley | A basic example of using [Jason's] MP3 Class Module to create an MP3 Player that uses the winmm.dll (Uses Api). This was made using Visual Basic 6.0, but should work with any 32 Bit Visual Basic. | Download |
MPlay3 | hostyle | Source code from mPlay3. Shows basic mp3 playing functions: play, pause, stop, mute, previous file and next file(play) buttons. It also has load last directory. | Download |
String Encryption | gozer | Another way you can encrypt and decrypt text. This one's a bit more complicated than the other one. | Download |
String Encryption | Dracula X | An example on how to encrypt and decrypt text. | Download |
System Information | Craig Jasper, Jr. | An example on getting system information. [Made for Win2000] | Download |
System Wide Hotkeys | Craig Jasper, Jr. | An example of system wide hotkeys without a third party control. [VB5 and up] | [Missing] |
Tabstrip and Progressbar Control Example | patorjk | This is a small example on how to use the tabstrip control and the progressbar control. | Download |
Time Left Example | patorjk | This is an example on how to calculate how much time it will take to preform certain tasks. The idea will only work with things that loop over and over. | Download |
Treeview Example | Shawn N. | An example showing how to use the Treeview control found in MSComCtl.ocx. | Download |
Windows Resource Meter | Eric Osterheldt aka Deep Arctic | A resource meter that displays phyiscal, virtual, and page file memory. | [Missing] |
Windows Uptime | Eric Osterheldt aka Deep Arctic | An example that shows you how to find out how long Windows has been running (in months, weeks, hours, minutes, and seconds format). | [Missing] |
Word Count | Eric Osterheldt aka Deep Arctic | Shows a way of counting the number of words in a text box. Uses some Windows API. | Download |
Word Count | Eric Osterheldt aka Deep Arctic | Shows another way to count the number of words in a textbox. No Windows API functions are used here. | [Missing] |