Microsoft KB Archive/101591
Understanding MDI and FoxPro for Windows
The information in this article applies to:
The multiple-document interface (MDI) is a Microsoft Windows standard that controls the behavior of windows and the relationship between parent and child windows. For example, if a parent window is maximized, all of its child windows grow along with it, or if one of the parent's child windows is maximized, all of its child windows are maximized. The commands that support MDI/NOMDI clauses are DEFINE WINDOW and MODIFY WINDOW.
NOTE: Clicking the mouse does not allow you to cycle between windows.
In FoxPro for Windows, defined windows are not MDI compliant by default. To make a window MDI compliant, it must be defined with the keyword MDI. For example:
DEFINE WINDOW test FROM 1,1 TO 20,20 MDI
Windows defined by FoxPro, such as Browse windows and other editing windows, are MDI compliant by default. In FoxPro for Windows, you can tell that a window is MDI compliant if when the window is maximized, the window's title appears in the title bar above the FoxPro system menu bar. The title bar will usually look something like "Microsoft FoxPro - <XXXXX>", where "<XXXXX>" is the title of the window. To make a system window, for example, a Browse window, non-MDI compliant, use the DEFINE command to define a non-MDI compliant window and then execute the BROWSE command with the WINDOW parameter. For example:
USE CUSTOMER DEFINE WINDOW test FROM 10,1 TO 20,40 BROWSE WINDOW test
This example demonstrates the difference between MDI and non-MDI compliant windows:
DEFINE WINDOW test1 FROM 1,1 TO 10,20 CLOSE ZOOM MDI TITLE 'test1' DEFINE WINDOW test2 FROM 22,1 TO 30,30 CLOSE ZOOM MDI TITLE 'test2' DEFINE WINDOW test3 FROM 1,30 TO 30,50 CLOSE ZOOM NOMDI TITLE 'test3' * the previous command clause NOMDI is optional ACTIVATE WINDOW test1 ACTIVATE WINDOW test2 ACTIVATE WINDOW test3
Maximize the test1 window. The title bar above the FoxPro system menu bar should now look like "Microsoft FoxPro - test1." Press CTRL+F1 to cycle to the next window. The title will change to "Microsoft FoxPro - test2." Cycle to the non-MDI compliant window (test3). It will not be maximized. Additional reference words: FoxWin 2.50 2.50a MDI ZOOM KBCategory: kbprg KBSubcategory: FxprgBrowse
Last Reviewed: June 27, 1995