Summary
All Windows Forms applications have at least one window in them, and
each window is represented by an object whose class derives from the
Form class. These classes are typically generated
by the Visual Studio .NET forms designer, which uses a standard
structure for handling initialization and shutdown. An application
could have just one form or it might have several, but in any case,
its lifetime is managed by the Application class.
The controls in a form can have their layout managed automatically,
and while there are several built-in styles of automatic layout, the
underlying mechanisms are also exposed, allowing custom automatic
layout systems to be written. Another useful feature of forms is the
ability to use an extender provider—these are components which
add pseudo properties (so-called extender properties) to some or all the controls on a form,
allowing the basic functionality of the Control
class to be augmented.
Of course, a great many Windows applications adorn their forms with menus, so in the next chapter we’ll look at how to add menus to your applications.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access