BUG: SaveAs Method Fails to Create SCX File from Runtime Form (163395)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0
  • Microsoft Visual FoxPro for Macintosh, Professional Edition 3.0

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a project. Add a new form to the project.
  2. Change the WindowType property of the form to 1-Modal.
  3. On the form, add two Command Buttons. In the Click event of the first Command Button, add the following code:
         RELEASE Thisform
    						
  4. In the Click event of the second Command Button, enter this code:
         Thisform.SaveAs ('myform')
    						
  5. Save the form.
  6. Build the project into an executable.
  7. 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.
  8. 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.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbBug kbProgramming KB163395