Tip Bank

DevX - Software Development Resource

Items of ParamArray can be Missing

When using the ParamArray keyword within a procedure, always remember that when the procedure is invoked from elsewhere in the program one of the argument might be omitted, and you

DevX - Software Development Resource

Correct usage for binary compatibility settings

When working on an updated version of a COM component, you should always enforce Binary Compatibility in the Component tab of the Project Properties dialog box. When enforcing binary compatibility

DevX - Software Development Resource

Manufacture a Missing value

Visual Basic doesn’t provide you with a means for creating a Missing value, a feature that in some cases would prove useful in order to simplify the syntax of calls

DevX - Software Development Resource

Correctly set scrollbars’ width and height

You should always modify a vertical scrollbar’s width and a horizontal scrollbar’s height to conform to the display resolution. You can learn the suggested size (in pixels) using the GetSystemMetrics

DevX - Software Development Resource

PrintRotatedText – Display a rotated message

Const LF_FACESIZE = 32Private Type LOGFONT lfHeight As Long lfWidth As Long lfEscapement As Long lfOrientation As Long lfWeight As Long lfItalic As Byte lfUnderline As Byte lfStrikeOut As Byte

DevX - Software Development Resource

Always run a component using Full-Compile

When testing a component in the IDE, always perform a full compilation. This ensures that VB checks the syntax of all the code in the component, which in turn guarantees

DevX - Software Development Resource

Never use the End statement

There are a lot of risks involved in using End in VB programs: your databases might not be correctly closed, your objects are not correctly terminated, etc. You should always