Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent Duplicate Instances of Modeless Form.
Message
From
20/11/1997 15:33:39
 
 
To
20/11/1997 15:30:35
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00061428
Message ID:
00061449
Views:
63
>>>>>Is there an easy way to prevent two copies of a modeless form from running? I have been trying to use the FindWindowEx api call but I am getting frustrated with figuring out the class name of the child window I am looking for. Please help.
>>>>
>>>>Do you mean two modeless forms within the same application?
>>>
>>>My menu calls a form "MyForm" with "do form MyForm". I want to prohibit two running copies of "MyForm"
>>>
>>>How do you reply so fast?
>>
>>That's because question is easy.
>>****Formset.Startform method (you can also apply it to _screen)
>>parameter cFormname
>I prefer a do case here :)
>DO CASE
>> CASE type("thisformset."+cFormname)="O"
>> this.&cFormname..show()
>> return 1
>> CASE thisformset.addobject(cFormname,cFormname) AND formset."+cFormname)="O"
>> && if Init successfully
>> this.&cFormname..show()
>> return 2
>> OTHERWISE
>> return 3
>>ENDCASE

Yes, I know that Case executes from top to bottom, but always suspect that something can happen and it will start move from bottom to top :)
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform