Category Archives: Visual Basic 6 (VB6)

Send clicks to another application

This code demonstrates how to send mouse clicks to another application using the SendInput API, in user32.dll. First, you’ll want to place the following code in a module. This is where you define some constants, and make reference to the API you are going to use. Public Structure MOUSEINPUT    Public dx As Integer    Public dy As Integer    Public mouseData As Integer    Public… Read More »

Check for duplicates in an array

I’ve been looking around for this code and no one could provide it. So finally I wrote it. It checks for duplicates in an array and returns true if there are any. Public Function AnyDup(NumList As Variant) As Boolean    Dim a As Long, b As Long    ‘Start the first loop    For a = LBound(NumList) To UBound(NumList)   … Read More »

Whitman Point of Sale (POS)

This is a fully functioning point of sale system written in VB6, utilizing an MS Access database. Overview I wrote this way back in 2003 for a friend, who actually used it in his business for quite a number of years. The only reason it went away is because he needed something more robust, with a multi-location and… Read More »

HelpTrax Helpdesk Application

I was going through some of my old code during a backup process, and I stumbled across this mostly complete help desk application I wrote about 13 years ago. Maybe someone can get some use out of it? This app began life as most of my code does, to solve one of my own problems. In this case,… Read More »

Building Random People

Yes, building people. This program, meant to demonstrate the use of a few different methods, builds random person data (Address, phone, etc). I didn’t build this for someone to build false identities for nefarious purposes, although it could probably be used for that. Nay, I built this to demonstrate the use of a few different concepts in Visual… Read More »

Create an Access database with VB6

Creating an Access database with VB6 should not be intimidating, and it is much simpler than you might think.  Four lines of code will do the job. In your project, simply create a refrence to the latest Microsoft DAO Object Library. On my installation, this is shown as Microsoft DAO 3.6 Object Libary. Once the necessary reference is made, simply… Read More »

Download website html code with VB6

In ancient Greek religion and Greek mythology, Demeter is the goddess of the harvest. This code sample demonstrates how to harvest the headers and html code of a web site via VB6. The code presented here shows how to download the header information and html code from a web site, and save that data to text file. In… Read More »

String Functions Module

I’ve put together a few string handling functions in a module that I’ve found useful over of the years, and thought I would share them here so that others might find them useful. Attached to this post is a zip file containing the module, which you simple have to extract and attach to your VB6 project. Below is… Read More »

Speed Optimization Using Arrays

I was recently given a small programming challenge by a friend, which entailed splitting a text file into multiple text files, based on word length. I got run time down to 11 seconds. Can you do better? The text file in question is a listing of dictionary words, A through Z, containing a total of 234,936 words. The… Read More »

Retrieving System Uptime

As a part of monitoring your environment, you will need to watch the uptime of your systems. There are a couple different ways to do this. The first way, and my preferred way to monitor uptime, is to “watch” a server or workstation from another or many other locations. A simple ping to the device and storing the… Read More »