July 30, 1997

More Versatile Array Parameters

You can write a single procedure that accepts any type of array as an argument by using a variantparameter. Within the procedure, address the array using the usual syntax: ‘

Easy CR/LF Padding

When I write text in message boxes, labels, and so on, and I need to include a carriage return/line feed, I use this function, passing it the number of CR/LFs

The Address of a Variable

THE ADDRESS OF A VARIABLEVB5 includes a built-in VarPtr function (see tip “Use the Object Browser to Discover UndocumentedFeatures”), but this function isn’t available in VB4. The VB4 runtime library

Cross Midnight Benchmarks

Traditionally, VB programmers benchmark their code using the Timer function. However, if your processmight terminate on the following day, you must take into account that the value returned by that

App.Path Might Return UNC Path Specifications

Unlike VB4, VB5””””s App.Path property might return a UNC path, such as “\serverprograms…”), undercertain circumstances, depending on how the program started and if it””””s interpreted in the VB IDE orcompiled

Friendly Enumerated Values

If you build an ActiveX control that exposes an enumerated property, you should define a Public Enumstructure that gathers all the possible values for that property. Doing this helps the

Standalone Type Libraries

If you create out-of-process OLE servers, Visual Basic embeds the companion type library into the EXE fileand generates no TLB file. However, if you own the Enterprise Edition of VB4

Implementation of Public Forms and Class Variables

The implementation of Public variables in forms and classes changed with Visual Basic 5.0. VB4 implementspublic variables in forms and class modules as if they’re regular variables, using pointers to