VB 6 Sample Code
-
Mouse Reaction Test
by Alex
This program tests your ability to react with the mouse to graphical information displayed on the screen e.g. on a game.
-
MAPI Emailer
by Alex
This code can send simple text emails easily. It uses MAPI controls to send an email.
-
Detect if a particular .exe is running
by Yew Chin Sing
That is some simple code to detect whether a particular .exe is running.
-
Adding multiline balloon tooltips to ListView item
by 10Tec Company
To create tooltip for list-view items, the code checks the item under the mouse pointer in the MouseMove event of the control. It uses for this purpose the LVM_HITTEST message that returns the index of the item at the specified position. The message is sent using the SendMessage API function. The lParam parameter of the function contains the reference to the LVHITTESTINFO structure; you must fill in the pt field of this structure with the coordinates of the mouse pointer before you invoke SendMe
-
Is DLL Registered
by Mike Bender
This source code shows how to check if a Dynamic-Link-Library (DLL) is registered and ready for use on your system via windows API.
-
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.
-
Compiling and executing Java Code in Visual Basic
by Obaid
If you are familiar with Java programming then you would probably know that one has to code in some text editor and then use Command Prompt to compile and run them by using the same old commands. Now that is indeed very annoying and of course there are many editor which allow you to compile and show the output of your code right there and then. Here I am going to show you how you can do this in Visual Basic. The program will ask for JDK Path and the Path of your code.
-
Registering COM Component Programmatically
by Thushan Fernando
Ever wanted to register a COM Component programatically but didnt quite like shelling to regsvr32.exe? This snippet is your new best friend, it will allow you to register and unregister any COM component:D
-
Send Email Using CDO
by Michael Gagne
This short example illustrates the sending of email using Collaboration Data Objects.
-
Custom Menu Items
by nzjonboy
Ever wanted to have your program in the explorer popup menu? Here's a sample application to help you.
-
Validate email addresses
by Mike J
How to check that a string is a properly formatted email address.
-
Create Table in a Database
by amoibade
This code shows you how to create a table and it's indexes in a database at run time.
-
Create Reg Key API
by Mike J
A beginners code to learn how to create a new key for your app in HKEY_LOCAL_MACHINE like "the real programmers" do, and not using VB's rather lame option.
-
Converting HTML Colour to RGB
by Kym Manson
How to convert a HTML colour code to a RGB format.
-
Binary to Decimal Convertor
by Sweet
A simple function to convert Binary numbers to Decimal numbers.
-
Add Controls at Runtime
by Brian Caudill
This program takes in a name for the control, properties of the control and type of control, and displays the control to the screen. Shows how to create controls at runtime.
-
ActiveX Data Object Simple Routines
by Macky M
These groups of Procedures will allow you to Open Databases, Run SQL Statements, as Well as Execute Stored Procedures without hassle...
-
Virtual Drive
by Josh
This will allow you to create a Virtual Drive on your computer, making a particular folder appear with its own drive letter.
-
MS Agent in a web site
by Warren
Ever wondered how to use the MS Agent characters from your website? This example demonstrates how, using JavaScript and VB Script
-
MP3 Player
by Edgar Sanchez
Demonstrates using the Windows Media Player control to create an MP3 player including theme generation, volume control, and random selection of songs.