Microsoft KB Archive/163395

= BUG: SaveAs Method Fails to Create SCX File from Runtime Form =

Article ID: 163395

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 3.0 for Macintosh

-



This article was previously published under Q163395



SYMPTOMS
If a Visual FoxPro executable program launched from the Windows Explorer or the Macintosh Finder runs a form that contains code to execute the SaveAs method of the form, the executable will not create the new form and no error message will be displayed. If the executable is launched in the Visual FoxPro environment, the SaveAs method works correctly.



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



Steps to Reproduce Behavior
 Create a project. Add a new form to the project. Change the WindowType property of the form to 1-Modal.  On the form, add two Command Buttons. In the Click event of the first Command Button, add the following code: RELEASE Thisform   In the Click event of the second Command Button, enter this code: Thisform.SaveAs ('myform')  Save the form. Build the project into an executable.</li> Run the executable in the development environment. Click the Command Button that has the SaveAs method in it. It will create a new form named Myform.SCX.</li> Run the same EXE from the Explorer. Click the button and note that Visual FoxPro acts busy for a brief moment, but does not create the form and does not display an error message.</li></ol>

Additional query words: kbvfp300 kbvfp300b kbvfp500 kbvfp500a kbvfp600

Keywords: kbbug kbprogramming KB163395

-

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

© Microsoft Corporation. All rights reserved.