O'Reilly logo

.Net Framework Essentials by Hoang Lam, Thuan L. Thai

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

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 controls and containers . 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.[46]

Similar to the Control ...

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