February 25, 2000

Remove Unused Controls From Projects

If you usually load many controls into your VB project during development, you often have controls loaded that aren’t used any more by the time the project’s finished. If the

Multiply Conditions for Boolean Result

You often have to test for multiple conditions when enabling a confirmation button or other control that commits user input. Instead of using complex If…ElseIf statements or inline If functions,

Save Forms’ Size and Location at Run Time

You’ve noticed how some apps display forms and toolboxes in the same location and size as when you last closed them. Here’s some simple code that gives your VB app

Use an Easier Autohighlight Method

Most of us have a routine we call to autohighlight the entire contents of a textbox when it receives focus. And most of us type the name of the textbox

Test for Illegal Characters

Use this fast function to test for the occurrence of nonalphanumeric characters in a string: Private Declare Function StrSpn Lib “SHLWAPI” Alias _ “StrSpnW” (ByVal psz As Long, ByVal pszSet

Turn a Textbox or Label Into a Marquee

Sometimes you need to display information longer than the biggest textbox or label control you can have onscreen. I’ve written a routine that displays a textbox’s or label’s contents in

Format Names Consistently

People’s names come in many separate parts, some of which might not be present or known. The hassle begins when you’re dealing with a storage system?database or otherwise?where the parts

Wrap I/O for Text Files

In a production application, every time you want to access a file for reading or writing, you must retrieve a free handle using the FreeFile() function to ensure you don’t