You need to save your form before you can run it. If you try to close the Form Designer when the form has not been saved, Visual FoxPro prompts you to save or discard the changes you've made.
To save a form
- In the Form Designer, choose Save from the File menu. Forms are saved as files with an .scx extension.
Saving Forms and Controls as Classes
You can also save a form, or a subset of the controls on a form, as a class definition. If you intend to create subclasses based on the form or reuse the controls in other forms, save the form as a class definition.
To save a form or selected controls as a class definition
- From the File menu, choose Save As Class.
- In the Save As Class dialog box, choose Current form or Selected controls.
- In the Name box, enter a name for the class.
- In the File box, enter a filename for the class to be stored to.
- Choose OK.
If you don't give the filename an extension, the default extension of .vcx is added when the file is saved. Once a form has been saved as a class definition, you can modify it with the MODIFY CLASS command. For more information about creating classes, see Object-Oriented Programming.