90 likes | 125 Views
Visual Basic .NET BASICS. Lesson 13 Multiple Forms. Objectives. Create multiple forms for a project. Use multiple forms to add an About box to your program. Use multiple forms to create a Splash screen that loads when your program starts. Modify a form at run time. Using Multiple Forms.
E N D
Visual Basic .NET BASICS Lesson 13 Multiple Forms
Objectives • Create multiple forms for a project. • Use multiple forms to add an About box to your program. • Use multiple forms to create a Splash screen that loads when your program starts. • Modify a form at run time.
Using Multiple Forms • Visual basic .NET allows you to work with multiple forms. • A splash screen is a window that appears briefly when a program is started. • An About box might include information about the program.
Creating a New Form • The first step in using additional forms in your project is to create the new form. • To get the About box to appear, some command must be issued. • A modal form must be dismissed before you can continue working with the application. • A modaless form can stay on the screen and be moved behind other forms in a project .
Adding a Splash Screen • Adding a splash screen is similar to adding an About box. • The splash screen must be loaded before your main screen. • Unlike an About box, a splash screen does not have a command to close it.
Modifying a Form at Run Time • Just as the objects on a form can be modified while the form is being displayed, form objects can also be modified before the form is displayed.
Summary • Visual Basic. NET programs can include multiple forms. Splash screens and About boxes are two common uses for additional forms in a program. • Modal forms must be closed before other forms in a project can be used. • Modaless forms can remain open, and a program can switch back and forth between several modaless forms.
Summary (continued) • The Close method is used to shut down a form and leave the program running. • A program module that includes only code can be used to control several forms. • Forms can be created without any border and placed in the center of the screen.
Summary (continued) • The Property Pages dialog box lets you select which form or module starts up the program when it runs. • The properties of a form and the object on the form can be changed under program control before the form is displayed.