Microsoft KB Archive/77734

= BUG: Incorrect Focus Shift for Disabled Control in Break Mode =

Article ID: 77734

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



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.



Steps to Reproduce Problem
 From the File menu, choose New Project. Place two controls on Form1 (in this example, two command buttons). From the Run menu, choose Start. From the Run menu, choose Break. In the Immediate window, type the following:

Command1.SetFocus

Command1.Enabled = 0

Print Screen.ActiveControl.Caption

The active control will be Command1. 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.</li></ol>

If the example code from step 5 above is used at run time, the focus will correctly shift from Command1 to Command2.

Keywords: kbbug kbenv KB77734

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.