devxlogo

October 30, 1999

Create colorful Command Buttons

The VB CommandButton control supports neither the ForeColor nor the BackColor properties. If you want to create colorful buttons without resorting to 3rd party controls, you can use an OptionButton

Make a Checkbox control read-only

By default, VB’s CheckBox controls automatically toggle their Value property when the user clicks on them. This is usually the desired behavior, but at times you may want to be

Enable and Disable all or part of a scrollbar

The new FlatScrollbar controls expose the ability to selectively disable their arrows. This is useful, for example, when the thumb indicator is at its minimum or maximum: Private Sub FlatScrollBar1_Change()

Hide and Show a control’s scrollbars

Most VB controls don’t let you determine whether they should display a scrollbar or not. For example, a VB ListBox control displays a vertical scrollbar only when the number of

Debug Print in an EXE

Contrary to common belief, Debug.Print statements are not always removed from an executable. This behavior can be demonstrated easily. Open a new project, place a single CommandButton on the default

Streamline Math in VBA

It’s possible to streamline some calculation procedures in Excel and add calculation capabilities that don’t exist in Word. Unfortunately, most textbooks on VB for Office 97 are focused on nonmathematical

Using Efficient Remote Interface Design

Because server/client round-trips are inherently inefficient, you should try to eliminate the need for excessive round-trips. When you design a class or a user-defined interface, you should never expose three