devxlogo

Tip Bank

Identifying a Generic Control at Run Time

When a procedure can operate on multiple types of controls, youcan use VB’s TypeOf function to determine a control type at runtime: Function myFunc(ctl as Control) ‘ This code works

Hexadecimal Color Constants

Properly designed Windows programs should change their own colorsaccording to the system colors. One of the reasons why developerstend to forget that part of design is that it is not

Undocumented Feature Logs Jet Queries

Jet 3.0 includes an undocumented feature that lets you log Jet’soptimization plan of queries. To enable this feature, you mustcreate this registry key using Windows’ RegEdit program: HKEY_LOCAL_MACHINESOFTWAREMicrosoft _ Jet3.0EnginesDebug

Avoid Redundant Execution of Code

Most collections are zero-based. The COUNT property returns thenumber of members of a collection, as opposed to the highest membernumber. So when we see code that loops through all the

Set Forms to Nothing with Caution

It’s a good idea to set your form variables to Nothing to recoverall memory that was allocated for the form module. Executing SetForm1 = Nothing for a loaded form, however,