devxlogo

August 7, 1997

Maintaining Constants

I like to use the Constant.txt file Microsoft has been kind enoughto provide. For a new project, copy Constant.txt to a new filesuch as MyConst.txt. Place MyConst.txt in the same

Where’s the Beep?!

This code will prevent a beep when you hit [ENTER] or [TAB] ina text box whose maximum character limit has been reached: Sub Form_KeyPress (keyascii As Integer)’Eliminate beep if {ENTER}

Printing Problems

Here is a tip to help with missing or mispositioned text. Thisfailing code works fine with VB3: ClsPrint Spc(10); “Enter Your Name”;currentx = 0currenty = currenty + 1Print Spc(10); “Enter

Close All Forms Before the End of a Program

It is well known that VB3 is not always as conscientious as itshould be about unloading all the forms in an application whentheapplication terminates. Because unloading all the forms for

Color My World-In Default!

Just before performing your final ‘make EXE,’ switch your desktopcolor scheme and see just how many backgrounds you have hard-coded!(Sadly, several excellent shareware controls fail here, VBPJcontributors are guilty of

Save Memory with A Picture Box

Set the AutoRedraw property to True and the benefits and trade-offsinclude much faster repaints and some wasted memory. If your formis resizable, you waste a lot of memory, because the

Cheap Focus Tracking

The Lost_Focus and Got_Focus events are the most-used events for implementing validation and texthighlighting. Wouldn’t it be nice to respond instantly to these events and to do it from a