August 5, 1997

Use RLEs to Reduce EXE Size

Many programs use a splash screen to display the logo of the program. The logo is usually made by an image. You used to store it as a BMP (uncompressed)

Obtaining System Date Format

The DateCheck function is useful when you use the Masked Edit control for entering the date according to the system format. Some countries use the MM/DD/YYYY format, and other countries,

Trimmed to Fit

This piece of code trims long file names to fit into forms captions, text boxes, and other limited spaces. The code allows you to specify the number of characters a

Prevent Unwanted Recursion

A bug affecting the Sheridan 3D Controls appears in VB 4.0a. I don’t believe it was in 4.0, and I am certain it was not in 3.0. In any case,

“File Exists?” Revision

To adapt the tip “File Exists?” (see “101 Hot Tech Tips for VB Developers,” Supplement to the August 1996 issue of VBPJ, page 7) to a directory list box, it

Long File Names Can Be Confusing

If you want to open Paint with a file from your application, it’s better to convert the path of the file you want to open from long to short names.

Calculate Age Using DateDiff

Use the function DateDiff to calculate an individual’s exact age based on birth date. DateDiff first calculates the total number of days an individual has been alive and then divides

Clear the Clutter

Provide your users with a quick way to clear their “messy desktop” of extraneous forms by dropping this code into the Click event of a command button: For Each Form