O'Reilly logo

Visual Basic® 2010 Programmer's Reference by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix J. Form Objects

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.

PROPERTIES

The following table describes some of the most useful Form properties.

PROPERTY

DESCRIPTION

AcceptButton

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.

ActiveControl

Gets the form's currently active control.

ActiveForm

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.

ActiveMdiChild

Gets the MDI parent form's currently active MDI child form.

AllowDrop

Determines ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required