COMPILE FORM Command

# COMPILE FORM Command

Visual Studio .NET 2003

Compiles one or more Form objects.

```COMPILE FORM | CLASSLIB | LABEL | REPORT FileName | cFileSkeleton |
? [ALL]
```

#### Parameters

FORM
Specifies that the file to compile is a form definition file (.scx). Source code for the data environment saved with the form definition file is compiled and stored in an additional memo field.
CLASSLIB
Specifies that the file to compile is a visual class library (.vcx). Visual class library source code is stored in memo fields in the visual class library table. COMPILE CLASSLIB compiles these memo fields into object code that is stored in an additional memo field.
LABEL
Specifies that the file to compile is a label definition file (.lbx). Source code for the data environment saved with the label definition file is compiled and stored in an additional memo field.
REPORT
Specifies that the file to compile is a report definition file (.frx). Source code for the data environment saved with the report definition file is compiled and stored in an additional memo field.
FileName
Specifies the name of the form to compile.
cFileSkeleton
Specifies a subset of form files to compile. cFileSkeleton is a file specification skeleton that supports wildcards such as * and ?. For example, to compile all Form objects that begin with A, use the following command:
```COMPILE FORM A*
```
?
Displays the Compile dialog box, allowing you to choose a file to compile.
ALL
Compiles all records for all Visual FoxPro platforms in the Form table. If you omit ALL, only records for the current Visual FoxPro platform are compiled.

#### Remarks

Forms are automatically compiled when they are saved in the Form Designer. Use COMPILE FORM to compile a form outside the Form Designer.

Form source code is stored in memo fields in the Form table. COMPILE FORM compiles these memo fields into object code that is stored in an additional memo field. The object code in this additional field is executed when you issue DO FORM.

Note that if a form has an include (.H) file and the include file is moved from its original directory, a compilation error occurs and is listed in the .err error log file. The form can be run, but cannot be saved if modified until you correct the path to the include file. To correct the path to the include file, open the form with MODIFY FORM, choose Include File from the Form menu, and specify the include file with its new path in the Include File dialog box.