MainFile Property

Applies To   See Also

Contains the name and path of the file set as the main program in a project. Read-only.

Syntax

Object.MainFile

Remarks

MainFile contains the empty string if a main program has not been set for a project. A program, form, or ActiveDoc class can be set as the main program in a project by right-clicking the program, form, or ActiveDoc class and choosing Set Main from the shortcut menu. You can also use the SetMain method to programmatically specify a main program for a project.

If an ActiveDoc class is set as the main program, MainFile contains the name and path of the .vcx visual class library containing the class. Use the MainClass property to determine the ActiveDoc class set as the main program in the project.