Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing multiple instances of a form
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00018445
Message ID:
00018459
Views:
42
>>>Does anyone have a way of preventing multiple instances of a form without setting the Form WindowType property to 1-Modal?
>>
>>Use the code similar to:
>>
>>If type('oMyForm') # 'O' or isnull(oMyForm)
>> oMyForm = creatobject('MyForm')
>>endif
>>
>>
>>Well anything like that should work.
>>
>>Tom
>
>
> I am not calling the forms as classes. I am using DO FORM. Is their something I could put in the Init method?

Hi Richard, before issuing your "DO FORM my_form", disable
the menu option or the button that you use to do that, or loop
through the forms and check the "caption" to see is it is already
running, also you can use a "flag" that you will turn on and off
every time you run or exit your form.
HTH
Good Luck.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Reply
Map
View

Click here to load this message in the networking platform