Tip Bank

DevX

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

DevX

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

DevX

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

DevX

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

DevX

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

DevX

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

DevX

What is a Side Effect?

The Standard defines a side effect as a change in the state of the execution environment. Modifying an object, accessing a volatile object, invoking a library I/O function, or calling