Microsoft KB Archive/250495

= PRB: SAVE SCREEN Not Creating Variable on CLEARed Screen =

Article ID: 250495

Article Last Modified on 1/19/2000

-

APPLIES TO


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

-



This article was previously published under Q250495



SYMPTOMS
When using the SAVE SCREEN TO command, the memory variable might not be created. When using the RESTORE SCREEN FROM command, you receive the error:

Variable is not found.



CAUSE
If the screen has been CLEARed, Microsoft Visual FoxPro is not able to save anything to the memory variable, so it is not created. If the memory variable already exists, the information in it is not overwritten.



RESOLUTION
Output of some kind to the screen (Visual FoxPro Desktop) enables the SAVE SCREEN TO command to create the memory variable. The statement: ? SPACE(0) right after the CLEAR command places a null string on the screen and does not affect screen appearance, but it causes the SAVE SCREEN TO command to create the memory variable.



MORE INFORMATION
This problem does not occur in Visual FoxPro 3.0b.

Steps to Reproduce Behavior
  Create a program in Visual FoxPro and add the following statements: CLEAR ALL CLEAR SAVE SCREEN TO X ? VERSION RESTORE SCREEN FROM X ? TYPE("X")  Run the code and note that the error mentioned in the "Symptoms" section appears.  Remove the asterisk from the line:
 * ? SPACE(0)

? SPACE(0) and execute the code again. 

Keywords: kbxbase kbprb kbpending KB250495

-

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

© Microsoft Corporation. All rights reserved.