Tip Bank

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

DevX - Software Development Resource

DirExists – Check that a directory exists

‘ Return True if a directory exists’ (the directory name can also include a trailing backslash)Function DirExists(DirName As String) As Boolean On Error GoTo ErrorHandler ‘ test the directory attribute

DevX - Software Development Resource

Access Help More Easily

Several developers have complained that in order to use Visual Studio 6.0’s online help, they must keep the MSDN Library CD in their CD-ROM drive, or copy all 680 MB