BUG: Control Unexpectedly Gains Focus When Made VisibleLast reviewed: December 22, 1997Article ID: Q172673 |
The information in this article applies to:
SYMPTOMSWhen you set the Visible property of a control to True at run-time, the active control loses focus. The control for which you changed the Visible property gains the focus. This problem occurs with the Sheridan 3D controls (SSRibbon, SOption, SSPanel, SSCommand, SSFrame and SSCheck). NOTE: This problem will occur with other controls created with the MFC Control FrameWork.
RESOLUTIONTo work around this problem, set the focus back to the control that was active prior to changing the Visible property of the Sheridan 3D control. The following code illustrates how you can restore focus to the active control after changing the Visible property of a SSPanel control:
Dim ctrl as Control Set ctrl = ActiveControl SSPanel1.Visible = True ctrl.SetFocusNOTE: This code does not prevent the LostFocus and GotFocus event from firing when focus is inadvertently set to the Sheridan 3D control.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
|
Additional query words: 3-D activex ocx mfc c++
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |