BUG: WindowType Changed at Run Time Can't Be Changed Back

Last reviewed: November 18, 1996
Article ID: Q141558
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0

SYMPTOMS

You attempt to change the WindowType of a running form from modeless to modal and then back to modeless. On the switch from modeless to modal, you succeed. But the attempt to switch the now modal form to modeless fails.

WORKAROUND

Although there isn't much call to do this at run time, the switch is one way only. There is no way to programmatically change it back.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The WindowType of a form should be a property you set a design time; not run time.

Steps to Reproduce Problem

  1. Create a new form, and set the form's WindowType property to Modeless.

  2. Place a command button on the form. In the Click method, add the following line of code:

    THISFORM.SHOW(1)

  3. Change the Caption property to Modal. Place a second command button on the form, and add the following code to its Click event:

    THISFORM.SHOW(2)

  4. Change the Caption property to Modeless. Place a third command button on the form. Change its Caption property to Release, and add the following code to its Click event:

    THISFORM.RELEASE

  5. Run the form. If you click the Release command button, the form closes as expected. If you click the Modal command button, the form becomes modal. You may test this by trying to click outside of the form and noting you are unable to activate anything outside of the form or access any other part of the Windows interface. If you then click the Modeless command button, the form does not return to a modeless WindowType. The form remains modal. The Release command button does not release the form. You must cancel the program to exit.


Additional reference words: 5.00 3.00 3.00b VFoxWin buglist3.00
buglist3.00b
KBCategory: kbprg kbbuglist
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 18, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.