BUG: Incorrect Focus Shift for Disabled Control in Break Mode

ID: Q77734


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, versions 2.0, 3.0
  • Microsoft Visual Basic programming system for Windows, version 1.0


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.

Additional query words:

Keywords : kbenv buglist2.00 buglist3.00 kbvbp100bug EnvtDes
Version : WINDOWS:1.0,2.0,3.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 20, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.