September 8, 2001

Incremental searches within list boxes

The DBList and DBCombo controls expose a MatchEntry property, that – when set to True – permits to perform quick incremental searches by simply typing the searched sequence of characters. If MatchEntry is set to False, any time the user presses a key, the next item that begins with that

Extended user interface for combo boxes

Apart from the different kind of combo boxes you can obtain by manipulating the Style property, another feature is made available by Windows when dealing with combo box controls, the so-called extended user interface. With standard combo box controls, the list portion stays invisible until the user presses F4 or

Smart Tab key processing in multiline TextBox controls

The only way for a Tab key to insert a tab character in a multiline text box is that the text box is the only control on the form, or at least the only control whose TabStop property is set to True. Otherwise, pressing the Tab key you simply move

Using Enter to move to next field

Most MsDos programs used the Enter key to move from one field to the next one. You can easily simulate this behavior by setting the form’s KeyPreview property to True and writing this code in the Form_KeyPress event: Sub Form_KeyPress (KeyAscii As Integer) If KeyAscii = 13 Then If TypeOf

Mutually exclusive list boxes

Many Windows programs use two adjacent list box controls to let the user select a number of items from a list of available values; such list boxes are mutually exclusive, in the sense that a given item always appear in the list box on the left (available items) or in

Move focus with Up and Down keys

In all standard controls, Up and Down arrow keys move the focus on the previous or next control in the TabIndex order, respectively. This contrasts with text boxes, where these keys move the caret on the adjacent character, which you can achieve in a more natural way using the Left