Specifying a Startup Form

See Also7W4DGT

 An application141RJVK does not have to start up with the first form in the projectBKAGDI; you can start your application with any form5272EF or a Sub Main procedure in a module.

To specify a startup form

   1. From the Options menu, choose Project.

     Visual Basic displays a dialog box.

   2. Select Set Startup Form.

   3. In the Setting box, select the form you want to start your application.

   4. Choose OK.

 

Instead of loading a form, Visual Basic can invoke a procedure to start an application.

To specify a startup procedure

   1. Write a general Sub procedure called Main and save it in a module.

   2. From the Options menu, choose Project.

     Visual Basic displays a dialog box.

   3. Select Set Startup Form.

   4. In the Project Options Setting box, choose Sub Main.

   5. Choose OK.

     When the project starts execution, Sub Main is called immediately.


See Also

Programmer's Guide:

Chapter 5, "Managing Projects"