BUG: VB5 Focus Not Returned to MDI Form After a Dialog Is ShownLast reviewed: August 12, 1997Article ID: Q172111 |
The information in this article applies to:
SYMPTOMSIn Visual Basic 4.0 and later, if a MDI Form's Enabled property is set to False before a CommonDialog (such as ShowOpen) is displayed, the focus does not return to the MDI form, even if it is set programmatically. The subsequent behavior is that instead of giving the MDI form the focus, focus is given to the last window that had focus before the MDI form.
RESOLUTIONThe current workaround for this confirmed bug is to not set the MDI Form's Enabled property to False. The CommonDialog is Modal and automatically disables the MDI Form because of its Modal nature. Thus the workaround code for the code example in this article is:
Private Sub Picture1_Click() CommonDialog1.ShowOpen End Sub 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
Keywords : VB4ALL VB4WIN vb5all Version : WINDOWS:4.0,5.0 Platform : WINDOWS Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |