devxlogo

Tip Bank

DevX - Software Development Resource

Compute Credit Card Check Digits

The last digit in your credit card number is a check digit derived from the other digits using the Luhn Formula as described in ISO/IEC 7812-1:1993. Its primary purpose is

DevX - Software Development Resource

Include Code for Debugging

VB supports conditional compilation, just like Visual C++. However, Visual C++ has a predefined constant named _DEBUG that makes it easy to include code only while debugging, as in this

DevX - Software Development Resource

Nix the X

Sometimes, you want to show a form that you don’t want users to be able to cancel by clicking on the X-it might not make sense for your app. The

DevX - Software Development Resource

Use This Higher-Resolution Stopwatch

Use this code to create a class called HiResTimer: ‘The number is codified as HighPart*2^32+LowPartPrivate Type LARGE_INTEGER LowPart As Long HighPart As LongEnd TypePrivate Declare Function QueryPerformanceCounter Lib _ “kernel32”

DevX - Software Development Resource

Prevent Checkbox Changes

You’ll often want to display a checkbox-style listbox to show users the values they have selected in an underlying database. However, you don’t want to allow users to change the

DevX - Software Development Resource

Call Up Windows Shell Features

Here’s a little routine that provides a quick and dirty way to call up some of the more oddball features of the Windows shell. It works by emulating user keystrokes,

DevX - Software Development Resource

Keep Track of Index Numbers

When using control arrays, I find it difficult to keep track of the index number of each control. Even if I use constants, I often have to look up the