July 10, 1999

Return a Dos error code on exit

At times you may want to return a Dos ErrorLevel when closing your VB application. This can be necessary, for example, if the EXE is meant to be called from

Quickly build a simple About form

If you need a quick-and-dirty About dialog box for your application, that maintains a consistent look with other Windows applications, look no further than the ShellAbout routine in SHELL32.DLL. Using

Use function name as a local variable

Many programmers don’t realize that it is perfectly legal to use the name of a function inside the Function itself, as if it were a local variable. This trick often

Polymorphic array procedures

You can create “polymorphic” routines that work with any type of array (except arrays of fixed-length strings, or UDTs) by using Variant parameters. Take for example the following code: Function

OverwriteHandler – A class for handling overwrite mode

‘———————————————————‘ OverwriteHandler class” you can associate this class to a form, using the’ Form property, and all the textbox controls in the’ form will support insert/overwrite mode switching” Usage: Dim

Count How Many Items Have Been Selected

The SELECT element includes an options array that is accessible from JavaScript. You can use a loop to iterate through this array and count how many choices the user has