Microsoft KB Archive/300140

= FIX: Minimized Modal Form Called from a Modal Form Cannot Be Restored =

Article ID: 300140

Article Last Modified on 10/16/2002

-

APPLIES TO


 * 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 Q300140



SYMPTOMS
If you minimize a modal form that was called from another modal form, you cannot restore the minimized form.



RESOLUTION
To quit the program, click Cancel on the Program menu. This allows you to close the forms.



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

This problem was corrected in Visual FoxPro version 7.0 for Windows.



Steps to Reproduce Behavior
  In Visual FoxPro (VFP) 5.0 or 6.0, paste the following code in a new program: *!* Q300140 FIX: Minimized Modal Form Called From A Modal Form Cannot Be Restored CLEAR ALL PUBLIC ox KEYBOARD '{enter}{enter}{ctrl+f9}' ox = CREATEOBJECT('form1') ox.Caption = 'Form '+ALLTRIM(STR(_Screen.FormCount)) ox.Show

DEFINE CLASS form1 AS FORM

ADD OBJECT cmdNewForm AS CommandButton ; WITH Left = 10, Top = 5, Height = 28, ; Width = 100, Caption = &quot;New Form&quot; PROCEDURE cmdNewForm.Click * Create another Form IF _Screen.FormCount < 3 LOCAL oy      oy = CREATEOBJECT('form1') oy.Caption = 'Form '+ALLTRIM(STR(_Screen.FormCount)) oy.Show(1) ENDIF

ENDPROC

ADD OBJECT cmdReleaseForm AS CommandButton ; WITH Left = 120, Top = 5, Height = 28, ; Width = 100, Caption = &quot;Release Form&quot; PROCEDURE cmdReleaseForm.Click THISFORM.Release RETURN ENDPROC

ENDDEFINE  Save and run the code (the name is unimportant). Form 3 is minimized and you cannot restore it. Also, you cannot close the other forms.

