O'Reilly logo

Visual Basic 2012 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 8, “Using Windows Forms Controls,” 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
AutoScroll Determines whether the form automatically provides scroll bars when it is too small to display all of the controls it contains.
AutoScrollMargin If AutoScroll is True, the control will provide scroll bars if necessary to display its controls plus this much margin.
AutoScrollPosition Adjusts the AutoScroll scroll bars so this point on the form is placed at the upper-left corner of the visible area (if possible). For example, if a button has location (100, 20), the statement AutoScrollPosition = New Point(100, 20) scrolls the form so the button is in the upper-left corner of the visible area.
BackColor Determines the form’s background color.
BackgroundImage ...

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