The information in this article applies to:
SYMPTOMSA Visual FoxPro .EXE file appears briefly, and then it exits to the operating system. CAUSEThe main program is a screen or menu, and no READ EVENTS command has been issued. In Visual FoxPro, the Command window provides a place for your application to wait for the next command. Because the Command window is unavailable in a run-time application, the .EXE file has no wait state to anticipate keyboard input, so the application returns to the operating system. RESOLUTIONA READ EVENTS command or a modal form will provide a wait state for your application. STATUSThis behavior is by design. MORE INFORMATIONAdding a READ EVENTS to a menuIf the main program in your project is a menu, a READ EVENTS command should be added to the menu as follows:
Creating a Modal Form or FormsetThe easiest way to provide a wait state for a form or formset is to set the WindowType property to 1 - Modal at design time.This may be undesirable if you want to run other forms from within the current form or formset. Creating a Program that Issues a Read EventsThe form or formset can be run from within a program that issues a READ EVENTS. For example:
Adding a READ EVENTS to a form or formsetIf you do not want to create a wrapper program that runs the form and issues a read events command, you can add the appropriate code to the form or formset itself. For example:
Steps to Reproduce Behavior
REFERENCESVisual FoxPro Professional Features Guide, Chapter 9. Additional query words: foundation READ
Keywords : kbcode kbVFp FxprgGeneral |
Last Reviewed: August 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |