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:
00018521
Views:
35
>>
>>LOCAL lnMenuNum, ;
>> lAllowInstance, ;
>> lcFormName
>>lAllowInstance=thisform.allowinstance()
>>if lAllowInstance
>> *-- Add form's caption to the menu
>> thisform.AddToMenu()
>>else
>> lcFormName = thisform.Name
>> ACTIVATE Window &lcFormName && if already exist , just switch to it
>>
>>endif
>>
>>return lAllowInstance
>
>>
>>Nick
>
>
>I got something like this to work, but I am having a problem with the toolbar of a formset still executing even though I return a .f. from the init method of the main form of the form set. If the form exists, I want to close the whole formset.

In this case, maybe you can do something like

FormIknowThatExists.Parent.Release()

and it should release the whole formset along with a toolbar.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform