The System.Windows.Forms Namespace
In this section, we describe the architecture of Windows Forms and introduce the classes that make up the Windows Forms namespace.
Windows Forms architecture is rather simple. It takes the form of
This is similar to Java JFC model where container types of classes
are Panel, Window, JComponent, and so on, and control types of
classes are Button, Checkbox, Label, and so on. Most user-interface
classes in the Windows.Forms namespace derive from the Control class.
In a sense, everything that you see in a Windows Forms application is
a control. If a control can contain other controls, it is a
container. The application user interface consists of a form object
acting as the main container, as well as the controls and other
containers that reside on the form.
Similar to the native Windows API common functions, the System.Windows.Forms namespace provides a common set of classes you can use and derive from to build Windows Forms applications. The classes and interfaces in this namespace allow you to construct and render the user-interface elements on a Windows Form.
As we have seen from the last chapter, the System.Web.UI namespace provides the classes for building web applications. Similarly, the System. Windows.Forms namespace provides the classes for building standard applications. The System.Windows.Forms namespace is analogous to the System.Web.UI namespace, as described in the previous chapter.
Similar to the Control ...