BUG: Incorrect Focus Shift for Disabled Control in Break Mode (77734)



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Visual Basic Standard Edition for Windows 1.0

This article was previously published under Q77734

SYMPTOMS

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.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base 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.

Modification Type:MajorLast Reviewed:12/12/2003
Keywords:kbBug kbenv KB77734