Tip Bank

DevX - Software Development Resource

Use the MS Draw Applet to Draw Lines and Shapes

Rather than using Visual Basic’s line and shape objects when drawing complex graphic backgrounds on forms, use the MS Draw applet included with most Microsoft products to draw a Windows

DevX - Software Development Resource

Copying Menu Objects Between Forms

One problem that occurs frequently is taking the menu structure from one form and placing it in another. Although my method of dealing with this dilemma requires a little effort,

DevX - Software Development Resource

ODBC Error Display

I have seen many posters in the VB newsgroups that say they have received an ODBC error message such as 3146, but can’t figure out why they got the message.

DevX - Software Development Resource

Set Cursor to Control by Default

Sometimes it is useful to set a cursor to determine control when a form is loading-after the form is done loading, the cursor stays on the control you have ordered:

DevX - Software Development Resource

A Better Substitute for GetModuleUsage

To synchronously shell an application from a 16-bit VB application, some people write code like this: Const HINSTANCE_ERROR% = 32Dim hInstChild As Integer’Shell program, if Shell worked, enter loophInstChild =

DevX - Software Development Resource

Entering Scientific Formulas

I have developed this technique to use when I program long formulas. First, I declare descriptive variables for the mathematical elements. I prototype the formula using the digit “1” as

DevX - Software Development Resource

Create Queries On the Fly

Use VB’s string-concatentation operator (&) to incorporate user input into SQL queries at run time. Assume, for example, that cboField is a combo box containing a list of fields in

DevX - Software Development Resource

Speed Tips

Reading data into and out of a VB program is straightforward. Most folks use the Input and Put statements in a For…Next loop. However, this straightforward technique takes time. Because