Incorrect Focus Shift for Disabled Control in VB Break Mode

ID Number: Q77734

1.00

WINDOWS

buglist1.00

Summary:

In Break mode in the Microsoft Visual Basic environment (VB.EXE),

disabling a control or making a control invisible does not shift the

focus to the next control in the tab order. Instead, the focus remains

on the disabled control.

At run time, the focus correctly shifts to the next control in the tab

order.

Microsoft has confirmed this to be a problem in Microsoft Visual Basic

programming system version 1.0 for Windows. We are researching this

problem and will post new information here as it becomes available.

More Information:

Steps to Reproduce Problem

--------------------------

1. From the File menu, choose New Project.

2. Place two controls on Form1 (in this example, two command buttons).

3. From the Run menu, choose Start.

4. From the Run menu, choose Break.

5. In the Immediate window, type the following:

Command1.SetFocus

Command1.Enabled = 0

Print Screen.ActiveControl.Caption

The active control will be Command1.

6. From the Run menu, choose Continue.

Note: The disabled control, Command1, will still have the focus. To

shift the focus to the next control in the tab index, press the TAB

key.

If the example code from step 5 above is used at run time, the focus

will correctly shift from Command1 to Command2.

Additional reference words: 1.00