PRB: Form.Show() Within WITH Block Prevents Release of Modal Form (273483)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q273483 SYMPTOMS
If you attempt to use the Show method within a WITH...ENDWITH block in a modal form, issuing a ThisForm.Release() method call does not release the form. In Visual FoxPro version 6.0, clicking the Close Box in the upper-right corner of the form closes the form, but does not close the form in Visual FoxPro version 3 or 5.
CAUSE
The form does not release because the WITH command is holding an outstanding object reference.
RESOLUTION
Issue the Show method of the form outside of the WITH block:
WITH oForm
.Caption = "Erin"
.WindowState = 2
ENDWITH
oForm.Show(1)
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbCodeSnippet kbCtrl kbpending kbprb KB273483 kbAudDeveloper |
---|
|