Microsoft KB Archive/221727

= FIX: FOXUSER Restores Window to Incorrect MDI State =

Article ID: 221727

Article Last Modified on 5/10/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q221727



SYMPTOMS
You edit a program, file, form, or class. You maximize the editor or designer window. When you close and then reopen the editor window, it will once again be maximized.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug has been fixed in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



MORE INFORMATION
Visual FoxPro is a Multiple Document Interface (MDI) application. MDI applications use a single primary window (the MDI parent window) to display one or more child document windows (MDI child windows). In the case of Visual FoxPro, the parent window is the Visual FoxPro desktop and the MDI child window would be the editor or designer window. When an MDI child window is maximized, the child window's title bar icon appears to the left of the primary window's menu bar, and the child window's control buttons (Minimize, Restore, and Close) will appear to the right of the primary window's menu bar. The name of the document being edited will appear in the application's main title bar followed by a hyphen and the normal application titlebar caption. For example, if you are editing a program called myprogram.prg in Visual FoxPro, when the editor MDI child window is maximized, the titlebar caption will read "myprogram.prg - Microsoft Visual FoxPro."

Steps to Reproduce Behavior
NOTE: SET RESOURCE must be ON for this behavior to occur.   Execute the following code in the Command Window: MODIFY FILE TEST  An empty editor window will appear. Click on the Maximize button in the editor window. This will be the center button of the three buttons in the upper right corner of the editor window. Close the editor window by pressing the ESCAPE key. Repeat step 1. The editor window will again appear maximized. This is incorrect. MDI guidelines dictate that child MDI windows should appear maximized only when the application itself is in an MDI maximized state. The application's MDI maximized state occurs when any child MDI window is explicitly maximized. This means that any additional MDI child windows opened after one is maximized will also appear maximized, and any currently open MDI child windows will be maximized when a single MDI child window is subsequently maximized.

The described behavior also occurs within the Class Designer, Form Designer, Database Designer, and code editor windows within the Form and Class Designers.

