VB 6 Sample Code
-
Set Maximum/Minimum form size
by James Crowley
How to prevent a form from being resized outside specified values
-
ListView Background Image
by VB Accelerator
This code shows you how to display a background image in the ListView control.
-
String compression
by Nick Avery
Use this simple code to compress strings by finding patterns. Decompression code is also included.
-
Are You Running in the IDE?
by Karl Moore
Here's how to detect if your .NET code is currently being debugged, or if we're in design mode.
-
Start and Close an application
by James Crowley
How to start and then close an application using code
-
Show/Hide Desktop Icons
by Adil Hussain Raza
This code uses API calls to Hide/Unhide icons on the desktop. This code uses FindWindowEx & ShowWindow API Calls to do the job.
-
Popup Menu Example
by James Crowley
How to display a popup menu
-
Treeview Files/Folder Lists Recursively
by Kym Manson
These two routines will scan a path and add files/folders to a treeview control. It will also scan subfolders.
-
TAPI Application
by S.S. Ahmed
This is a short application showing you how to create a small telephony application.
-
Dialer
by James Crowley
How to dial a telephone number using the MS Comm control
-
Shutdown, restart or log off
by James Crowley
How to shutdown, restart or log off the PC
-
Capture ScreenShot
by James Crowley
How to capture a screen shot of a window or the desktop
-
BackColor and BarColor of a ProgressBar
by WonderGuy
How to change the color of a progress bar (BarColor and BackColor).
-
Creating Folders using recursion
by Lio
This code creates a folder by giving it the folder's full path. It checks all parent folder(s), and creates them if they don't exists using recursion. Very useful for Setup programs.
-
Put your VB application into deep sleep
by ElementK Journals
How to 'Pause' your application using the Sleep API
-
ASCII to Binary string
by Mike J
How to obtain the binary string for the ASCII code of a character.
-
Get file information
by James Crowley
How to retrieve file information such as file size, modified date, and its attributes in VB
-
Justify text when printing
by Chris Gibson
A neat little function to fully justify text when printing
-
Custom Title Bar
by nzjonboy
Do you want to create your own title bar for forms in your VB application? Here's how.
-
Read text files into ADO recordsets
by James Crowley
How to accurately read text files into ADO recordsets