Microsoft KB Archive/315645

= FIX: Docked Watch window or toolbar causes an error if you override the _Screen.Resize property =

Article ID: 315645

Article Last Modified on 2/11/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q315645



SYMPTOMS
If you override the _Screen.Resize property and then dock the Watch window or toolbar, Visual FoxPro may report the following error and close unexpectedly:

Fatal error: Exception code=C0000005



RESOLUTION
To resolve this problem, obtain the latest service pack for Visual FoxPro for Windows 7.0. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

316964 How to Obtain the Latest Visual FoxPro for Windows 7.0 Service Pack



STATUS
Microsoft has confirmed that this is a problem in Microsoft Visual FoxPro for Windows 7.0. This problem was first corrected in Visual FoxPro for Windows 7.0 Service Pack 1.



Steps to Reproduce Behavior
 On the Tools menu, click Options, click Debug, and in the Environment drop-down list box, select FoxPro Frame. Dock the Watch window to the top or side of the desktop, and then close it.  Create a program named &quot;Test, add the following code, and then run the program: *-- Code begins here. CLEAR ALL _screen.NewObject('oLogo', 'logo') KEYBOARD '{alt+t}h' && Open watch window. SUSP, then DEBUG from CW crashes as well.)

DEFINE CLASS logo AS image oscr = _SCREEN

PROCEDURE oscr.Resize ENDPROC ENDDEFINE 
 * -- Code ends here.

To reproduce the problem with a Report Preview toolbar, follow these steps:  Close all dockable windows.  Run the following code from a program (.prg) file: *-- Code begins here. _screen.WindowState = 2

SET RESOURCE ON CLEAR ALL

CREATE CURSOR c1 (f1 c(5)) INSERT INTO c1 VALUES ('xxx')

CREATE REPORT testxx from (DBF) REPORT FORM testxx PREVIEW

_screen.NewObject('oLogo', 'logo') FOR lni = 1 TO 100 REPORT FORM testxx PREVIEW NOWAIT RELEASE WINDOW 'Report Designer' ENDFOR RETURN

DEFINE CLASS logo AS image oscr = _SCREEN

PROCEDURE oscr.Resize ?PROGRAM, DATETIME ENDPROC ENDDEFINE </li> When the first preview appears, dock the preview toolbar to the left side of the desktop and then close the preview. (The behavior may occur even if you do not first dock the toolbar.)
 * -- Code ends here.

The error appears on one of the next previews.</li></ol>

Additional query words: kbVFP700sp1fix

Keywords: kbbug kbfix kbcodesnippet KB315645

-

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

© Microsoft Corporation. All rights reserved.