VB 6 Sample Code
-
wExceptionHandler Handles your Exception Errors!
by Thushan Fernando
This is an ExceptionHandler, what is an Exceptionhandler? Once the wExceptionHandler is installed it will allow you to catch and trap those errors that Windows will throw at your application (Eg. Access_Violation) Which doesnt get treated by the Visual Basic Error handler, making your application bullet proof!
-
Create nested folders
by Harold Noble Bright
Automatically create nested folders using this simple procedure
-
Converting RGB to HEX colour codes
by Ruan Meyer
This is a simple color converter, Using a textbox control to display the color, three text boxes for Red, Green and Blue values, also 3 sliders if the exact rgb color is not known
-
Prevent Multiple Instances
by Terry Rogers
Prevent Multiple Instances of a 32-bit VB Application
-
Generic Quick Sort
by Peter Chapman
A generic implementation of the infamous quick sort algorithm. Uses a simple callback mechanism allowing any data type inculding UDT's and objects to be sorted quickly and efficiently.
-
Sorting Algorithms
by Michael Gagne
Here are some examples of sorting algorithms in Visual Basic. It includes the Quick Sort, the Selection Sort, and the Bubble Sort. Bonus code is included for using the Quicksort on a 2-dimensional array, sorting by one of the dimensions.
-
Creating color degradations with any two colors
by Jose Pablo Ramirez Vargas
Two functions that allow the calculation of the colors between any given two colors. The color gradient can be customized.
-
Fading The Form
by Antony Lees
In most setup programs you will see the form start as black at the bottom of the form and fade into a light blue at the top of the form. This code shows you how to do just that, with any colour you want!
-
Icons in Menus
by bond
A sample program to teach how to add an icon to a menu item. It will show you how to add an icon beside the Save, New, Open, etc. in a menu bar.
-
Listview SubItem Click Detection
by Kym Manson
How to detect when a Listview's subitem has been clicked.
-
Fit Filenames Into a Specified Width
by Kym Manson
You know how some programs (like when Windows copies a file) the filename is too long, so Windows shortens it to "C:\Wind...\help.txt"; well, this is how to do it.
-
Custom Title Bar
by nzjonboy
Do you want to create your own title bar for forms in your VB application? Here's how.
-
Cheat-O-Matic
by Yodan Tauber
An example for using RegisterHotKey and Keybd_event... And a nice utility to help you use cheats on games!
-
Convert bitmap to black & white
by Alex
This is simple code that can load, convert and save any picture. It will take any colour bmp and convert it to a black & white picture. This can be used for creating old-fashioned photos from modern full colour ones.
-
Multi Instance Forms
by Dominic Miller
This code will show you how to use forms in multi instances, meaning you can create many instances of a control at runtime but yet only need create the form once at design.
-
AutoDial with WinInet API
by Thushan Fernando
This is an addition to my collection of the Windows Inet DLL functions. Shows how to Auto-Dial without the user having to insert usernames and passwords. All Automated!
-
3D Designer
by Alex
This is a program that can draw any 3D wireframe object that you can simply make using the functions in the code. You can rotate the 3D shape around one axis or the program can rotate the shape automatically.
-
Web Browser in Picture Box
by Michael H
This browser doesn't use anything but a picture box and a winsock control.
-
Transmitting a file over a Network
by Chris Stones
Transfer a file over a network with this activeX ocx control. Use this control instead of winsock, and call the upload or download subroutine, its that simple!
-
Autolink
by David Nishimoto
Automatic jump to a url on when the mouse moves over a link