共用方式為


Creation of Single- and Multiple-Document Interfaces

Visual FoxPro allows to you to create two types of applications:

  • Multiple-document interface (MDI) applications consist of a single main window, and the application's windows are contained within or float on top of the main window. Visual FoxPro is primarily an MDI application, with the command window, edit windows, and designer windows contained within the main Visual FoxPro window.
  • Single-document interface (SDI) applications consist of one or more independent windows, each of which appears separately on the Windows desktop. Microsoft Exchange is an example of an SDI application, in which each message you open appears in its own independent window.

An application consisting of single window is usually an SDI application, but some applications mix SDI and MDI elements. For example, Visual FoxPro displays its debugger as an SDI application, which in turn contains MDI windows of its own.

To support both types of interfaces, Visual FoxPro allows you to create several types of forms:

  • Child form. A form contained within another window, used in creating MDI applications. Child forms cannot be moved outside the bounds of their parent form (the main form), and when minimized appear at the bottom of their parent form. If their parent form is minimized, they are minimized along with it.
  • Floating form. A form that belongs to a parent (main) form, but is not contained within it. Instead, floating forms can be moved anywhere on the screen. They cannot be moved behind their parent window. If minimized, a floating form appears at the bottom of the desktop. If their parent form is minimized, floating forms are minimized along with it. Floating forms are also used in creating MDI applications.
  • Top-level form. An independent form without parent form, used to create an SDI application, or to serve as the parent for other child forms in an MDI application. Top-level forms work at the same level as other Windows applications, and can appear in front of or behind them. They appear on the Windows taskbar.

Child, floating, and top-level forms

See Also

Setting the Data Environment | Creating Forms | Specifying a Form Type | Displaying a Child Form Inside a Top-Level Form | Hiding the Main Visual FoxPro Window