Microsoft KB Archive/187907

= BUG: SDI Form Fails to Get Focus With _Screen.Visible=.F. =

Article ID: 187907

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q187907



SYMPTOMS
Setting the Visible property of the _Screen to .F. in the Load event of a SDI (Single Document Interface) form prevents the form from gaining focus.



RESOLUTION
Place the _Screen.Visible command in the Activate event of the form instead of the Load event.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



MORE INFORMATION
If the Debugger is open when the program runs, the SDI form gets focus as expected.

Steps to Reproduce Behavior
Create a program that contains the following code and run the program:

Sample Code
LOCAL aobj[1], xx  CREATE FORM SDI NOWAIT ASELOBJ(aobj,1) xx = aobj[1] xx.ShowWindow = 2 xx.Autocenter = .T.  xx.WriteMethod('Load',[_screen.visible=.f.]) xx.WriteMethod('Unload',[_screen.visible=.T.]) KEYBOARD 'Y' CLEAR RELEASE WINDOW 'Form Designer' DO FORM SDI

Additional query words: kbDSupport KBDSE kbVFp500abug

Keywords: kbbug kbnofix KB187907

-

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

© Microsoft Corporation. All rights reserved.