BUG: The formset from a functional conversion closes unexpectedly in Visual FoxPro (262572)
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
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q262572 SYMPTOMS
After a functional conversion of a FoxPro 2.x (for either MS-DOS or Microsoft Windows) Screen is performed, the resulting formset closes unexpectedly after printing a report or encountering an error that is handled by the default error handler of Visual FoxPro.
CAUSE
The FoxPro 2.x Screen contained code in the On Window Deactivate section. The Visual FoxPro functional conversion process places this code in the ReadDeactivate event of the resulting formset. Any code or comments in the ReadDeactivate event of the formset cause the form to unload when the Screen loses focus to any of the following items:
- The Error dialog box of the default Visual FoxPro error handler.
- The Printing Report spooler dialog box that appears when printing a Visual FoxPro report.
- The window created by a MODIFY COMMAND or MODIFY MEMO command.
- Invoking a Visual FoxPro form with a Do FORM command.
RESOLUTION
To avoid this behavior, remove all code and comments from the ReadDeactivate event of the formset. Generally, this code can be placed in the Destroy event of the formset. Test the application to ensure that the code functions properly once it is moved out of the ReadDeactivate event.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 2/23/2005 |
---|
Keywords: | kbBug kbCodeSnippet kbContainer kbCtrl kbpending kbprint kbXBase KB262572 |
---|
|