Previous Section  < Day Day Up >  Next Section

6.7. Summary

Despite the migration of applications to the Internet, there is still a compelling need for Windows Forms programming. Windows Forms provide features and functionality superior to those of Web Forms. Moreover, the majority of real-world applications continue to run on local area networks. The .NET Framework Class Library provides a rich set of classes to support forms programming. The Control class at the top of the hierarchy provides the basic properties, methods, and events that allow controls to be positioned and manipulated on a form. Keyboard and mouse events enable a program to recognize any keys or mouse buttons that are clicked, as well as cursor position.

The Form class inherits all of the Control class members and adds to it properties that specify form appearance, position, and relationship with other forms. A form created by another form may be modal, which means it does not relinquish focus until it is closed, or modeless, in which case focus can be given to either form. In a multiple document interface (MDI) application, one form serves as a container to hold child forms. The container usually provides a menu for selecting or rearranging its child forms.

.NET includes a HelpRequested event that is fired when a user pushes the F1 key. This can be combined with the Help.ShowHelp method, which supports compiled HTML (.chm) files, to enable a developer to provide context-sensitive help on a form.

    Previous Section  < Day Day Up >  Next Section