Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect multiple activation of form
Message
From
18/02/2004 10:02:33
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00878119
Message ID:
00878294
Views:
17
>Leeroy,
>
>One surefire waay is to disable the launching mechanism when you start the form and reenable it when the form terminates. For example in a button click:
>
>
do form xyz with this && which is a subclass of SingleInstanceForm
>
>* SingleInstanceForm.Init
>lparameter roCallingObject
>
>this.oCaller = roCallingObject
>this.oCaller.Enabled = .f.
>
>* SingleInstanceForm.Destroy
>this.oCaller.Enabled = .t.
>this.oCaller = .null.
>
>

It seems more proper to me that the caller should disable itself, rather than asking the called form to do so. Of course, neither of these methods will work when the form can be called from multiple locations.

Chris.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform