How to Prevent Two Instances of a Form from RunningLast reviewed: April 4, 1996Article ID: Q130531 |
The information in this article applies to:
SUMMARYA form created in Visual FoxPro defaults to a multiple-instance form; that is, multiple instances of the form are allowed to run concurrently. This article shows by example how to create a form that does not allow another instance of itself to be created, which is how FoxPro version 2.x forms behave.
MORE INFORMATIONTo prevent the creation of a second instance of a form, add a procedure to the Init event of the form to check all open forms for an instance of itself. Have the procedure return false (.F.) if an instance already exists. This will prevent Visual FoxPro from launching the second instance.
Step-by-Step Example
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |