70-526 MCTS


Add and configure a Windows Form

A Windows Form is the basis of any window displayed in an application. In general a windows application contains one or more forms containing the user interface. A Form is a container for hosting controls and menus that make up most windows applications. It can receive user input in the form of mouse clicks and keystrokes to interact with the controls and menus in order to perform some sort of operation.

In C# a windows form is an instance of the class Form that is contained in the System.Windows.Forms namespace.


Inheritance hierarchy

From the following hierarchy, we can see the classes from which the Form class inherits.

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.Control
        System.Windows.Forms.ScrollableControl
          System.Windows.Forms.ContainerControl
            System.Windows.Forms.Form
              derived classes...

Parent classes

ContainerControl (Refer System.Windows.Forms namespace)

A ContainerControl represents a control that can function as a container for other controls. This means that the Form class can also hold other controls such as buttons, labels, etc.

ScrollableControl (Refer System.Windows.Forms namespace)

A ScrollableControl class acts as a base class for controls that require the ability to scroll. This means that the Form class can also be scrollable.

Control (Refer System.Windows.Forms namespace)

The Control class implements very basic functionality required by classes that display information to the user. This means that the Form class can display information to the user.

Object (Refer System namespace)

Ultimately, every class derives from Object. This means that every method defined in the Object class is available to the Form class.


Exam Sections

  • Add a Windows Form to a project at design time.

  • Configure a Windows Form to control accessibility, appearance, behavior, configuration, data, design, focus, layout, style, and other functionality.


MSDN references

  • ContainerControl Class
  • ScrollableControl Class
  • Control Class
  • Object Class
  • System Namespace


    << Previous Contents Next >>

    © Publicjoe, 2007