This appendix describes the most useful properties, methods, and events provided by the Windows Form class.
The Form class inherits indirectly from the Control class (Control is the Form class's "great-grandparent"), so in many ways, a form is just another type of control. Except where overridden, Form inherits the properties, methods, and events defined by the Control class. Chapter 9, "Using Windows FormsControls," discusses some of the more useful properties, methods, and events provided by the Control class and most of those apply to the Form class as well.Appendix A, "Useful Control Properties, Methods, and Events," summarizes the Control class's most useful properties.
The following table describes some of the most useful Form properties.
Determines the button that clicks when the user presses the Enter key. This button basically gives the form a default action. Most forms used as dialog boxes should have an Accept button and a Cancel button (see the CancelButton property described shortly). This makes the form more accessible to the visually impaired and is more efficient for users who prefer to use the keyboard.
Gets the form's currently active control.
Gets the application's currently active form. If an MDI (Multiple Document Interface) child form is active, this returns the active form's MDI parent.
Gets the MDI parent form's currently active MDI child form.