Site MapHelpFeedbackChapter Summary
Chapter Summary
(See related pages)

    1. Projects may need more than one form—there is virtually no limit to the number of forms that can be used within a single project. The first form in the application is called the startup form.
    2. Forms used for one project can be added to another project. Forms also can be removed from a project.
    3. To display a new form, you must declare and instantiate a form object.
    4. An About box, which typically contains information about the version of an application and the programmer and copyrights, may be created by adding a new form. C# has an About Box template form that you can use to create an About box.
    5. The About Box template automatically inserts information on the form from the project’s assembly information; you can enter the information in the Assembly Information dialog box.
    6. The Show (modeless) and ShowDialog (modal) methods are used to display a form on the screen.
    7. A form displayed as modal requires a response from the user; it must be closed or unloaded before any execution continues. When a form is displayed as modeless, the user can switch to another form without closing the form.
    8. The Form.Hide method hides the form but keeps it loaded in memory; the Form.Close method removes a modeless form from memory; the Form.Close method for a modal form actually hides the form rather than closing it.
    9. The form.Load event occurs once for each loaded form; the form.Activated event can occur multiple times, each time the form is shown.
    10. The form’s FormClosing event occurs just before the form closes. You can write event handlers for any of the form’s events.
    11. Use property methods to transfer the values from the private variables in one form to the private variables in a second form.
    12. To create a new property of a form, set up a private class-level variable to hold the value internally and write public accessor methods to allow the property to be set and retrieved. A property may be ReadOnly or WriteOnly if the property block contains only the appropriate get or set method.
    13. To display a second form and pass a value to a property of the form, instantiate a new form object, assign a value to the form object’s property, and show the form.
    14. A splash screen is a form that appears as an application loads, before the main or startup form. A splash screen is created as a form without the title bar and the control buttons. Code to display the splash form belongs in the Main method of Program.cs.
    15. Use a Timer component to control the length of time the form appears. Set the timer’s Interval property to the number of milliseconds; the compo- nent’s Tick event fires when the interval passes.
    16. You can run a project outside the VS IDE by moving and running the .exe file.







Programming in Visual C# 2005Online Learning Center

Home > Chapter 6 > Chapter Summary