All applications must have a main file, which is a file that sets the starting point for your application, performs the major tasks in your application, and links components in the application together.
|You can set only one file in a project as the main file.|
When you use the Application Wizard to create the project for your application, the wizard creates a main program file automatically. However, you can modify the main file created by the wizard or designate a different file in the project as the main file.
The Application Wizard also creates an application object you can use to manipulate your application. The main program created by the Application Wizard includes sections for instantiating and configuring the application object.
To set a main file for an application
Open the project for your application.
In the Project Manager, expand the nodes containing the file you want.
Click the file to select it.
On the Project menu, click Set Main.
The name of the main file appears in bold in the Project Manager.
|The file that you set as the main file is included in the build process automatically and is marked as read-only when you compile the application.|