Tip Bank

DevX - Software Development Resource

Add Incremental Search to a Combo Box

As the user types into a drop-down combo box, he or she passes keystrokes to the ComboIncrementalSearch routine, which then searches the combo box

DevX - Software Development Resource

Force the Short-Circuit

To optimize the If construct, separating testing conditions (“And” operator or “Or” operator) in different expressions can improve the performance. For example, don

DevX - Software Development Resource

Customize the IDE Toolbar

The VB Integrated Development Environment (IDE) contains many toolbars and menu functions, and the functions you normally use are usually on different toolbars and menus, so most programmers have several

DevX - Software Development Resource

Reading Binary Data from an ifstream

To read a binary value from an input file stream (ifstream) object, use the read() member function. read() takes two parameters: char * and long, which hold the address of

DevX - Software Development Resource

Parenthesize Macro Arguments

It’s a good idea to parenthesize every macro argument. For example: #define MAX(x,y) (x)>(y)?(x):(y) The parentheses ensure that the macro is evaluated correctly, even if the user passes complex expressions