次の方法で共有


How to: Save Forms

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

  1. From the File menu, choose Save As Class.

  2. In the Save As Class Dialog Box, choose Current form or Selected controls.

  3. In the Name box, enter a name for the class.

  4. In the File box, enter a filename for the class to be stored to.

  5. 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.

See Also

Tasks

How to: Save a Form as HTML

How to: Edit Event and Method Code

How to: Run a Form

How to: Set Properties at Run Time

Example of Manipulating Objects

Other Resources

Creating Forms

Working with Forms