August 6, 1997

Keep Track of the Last Form

In your MDI application, you might have many child forms and need a form to go back to the form thatcalled it. In each child form, declare this variable: Public

Val Doesn’t Work on Formatted Numbers

Beware of the Val() function. It doesn’t correctly recognize formatted numbers. Use CInt(), CDbl(), and soon instead: FormattedString = Format(1250, _ “General”) ‘ = “1,250.00”Debug.Print Val(FormattedString) ‘ prints 1 !Debug.Print

Format or Copy Diskettes Using Windows API

The Win32 API includes a pair of functions that let you format and copy diskettes from your programs: Private Declare Function SHFormatDrive _ Lib “shell32” (ByVal hwnd As Long, _

Show Free Memory Under Win32

If you want to show your users the available memory on the machine, and you’re moving from 16 bits to 32bits, you’ll find the API function GetFreeSystemResources has been dropped.

A Smart ID Generator

I wrote a unique error-proof number generator that greatly simplifies the checking of clients’ accountnumbers or other IDs used by your application. I use it in conjunction with the CheckForValid