June 5, 1999

DevX - Software Development Resource

Counting Bits

It seems that the only way to count the number of 1’s or 0’s in a binary value is creating a loop that iterates on all the 16 or 32

DevX - Software Development Resource

Capturing the Output of a MS-DOS Program

Have you ever heard of redirected input or consoleapplications? Have you ever had the need to launch MS-DOS programs, wait for them toterminate, and then dump their output to screen?

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

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

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