String Handling for File Operations

This is a module containing twenty useful functions for working with files, directories, drives, and volumes. Notice This content originally appeared on on extreme-vb.net. Permission from Bob Schwarz has been granted to included it here for archival purposes. We can’t reach the future without a bridge to the past. The below table contains a list of the functions,… Read More »

Convert MB to GB to TB with VB6

This sample project demonstrates not only the conversion of numbers, but also shows how to limit the input of text fields to numbers only. By entering a number in either of the top two boxes, the value will be converted on the fly (as you type) to the other measurements for megabytes, gigabytes, and terabytes. Attachments File Uploaded… Read More »

VB Snippets

These are some small yet handy snippets of code that some folks might find useful. All of the snippets were made using Visual Basic 6.0. They should be compatible with both Visual Basic 5.0 and Visual Basic 6.0. But I can’t be 100% positive on that. If you still use VB 5.0, then you will just have to… Read More »

Crosshairs on Your Form

This example illustrates how to use an instance of the shape object and two lines to cheat a selection rectangle commonly seen in vector based programs like AutoCAD or Microstation. Uses no API. Note This code was originally contributed by Ray Hildenbrand to Visual Basic Code Exchange The site has not been in operation for a number of… Read More »

Finding Last Modified Time for a File

By using API calls from VB6, we can quickly find the most recently used file, quickly. The code below is optimized to quickly find the most recently used file in a specified directory and returns its full name. I’ve also attached a sample project that contains the same information, for easy incorporation in to your project. Note This… Read More »

Using VB6 to Encrypt and Decrypt Files

The user will still be able to see the encrypted file, but if someone else logs on that machine and attempts to view the file they will see the encrypted file but not its contents. It has been possible to encrypt files using built-in function of Windows since the XP days. This example shows how to use this… Read More »

CSS Template: Back To Basics

I was cruising through some old backups, doing some house cleaning, and I found a trove of old templates that fooled around with, way back in 2002. I thought I’d dust some of them off, and update them a bit. Yes, I have backups going back that far. There some stuff in there going back as far as… Read More »

Calculate Area of Triangle with VB6

This is a quick example of how to implement a basic math formula within your program. The example project only contains one form, with three fields and a button: All three fields need to be populated with values, which is checked for in the code. Also, this example will only let you enter numeric values in the fields,… Read More »

How to Connect to MySQL with VB6

For some folks, connecting to a relational database system (RDBMS) seems like a magical art. It’s not really that difficult, and I’ll show you how to do it in this post. Even though Visual Basic 6 has been out of production for quite a number of years, I find that it is still being used to teach programming… Read More »