Chapter 10: Forms


Overview

The Visual Basic Windows Form class is a descendant of the Control class. The inheritance trail is Control image from book ScrollableControl image from book ContainerControl image from book Form. That means a form is a type of control. Except where overridden, it inherits the properties, methods, and events defined by the Control class. In many ways, a form is just another kind of control (like a TextBox or ComboBox).

At the same time, Forms have their own special features that set them apart from other kinds of controls. You usually place controls inside a form, but you rarely place a form inside another form. Forms also play a very central role in most Visual Basic applications. They are the largest graphical unit with which the user interacts directly. The user can minimize, restore, maximize, and close forms. They package the content provided by the other controls so that the user can manage them in a meaningful way.

This chapter describes some of the special features of Windows forms not provided by other objects. It focuses on different ways that typical applications use forms. For example, it explains how to build multiple-document interface (MDI) applications, custom dialogs, and splash screens.

Tip 

An MDI application displays more than one document at a time in separate windows within a larger MDI parent form. MDI applications usually provide tools for managing the child forms they contain. These let the user minimize child forms, arrange the icons for the minimized forms, tile the parent form’s area with the child forms, and so on. Visual Studio can display many windows (form designers, code editors, bitmap editors, and so forth) all within its main form, so it is an MDI application.

A single-document interface (SDI) application displays only one document in each form. For example, Microsoft Paint can manage only one picture at a time, so it is an SDI application. Some SDI applications can display more than one document at a time, but each has its own separate form.

The chapter covers the Form object’s properties, methods, and events only in passing. For a detailed description of specific Form properties, methods, and events, see Appendix J.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net