Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My modeless dialog disappears! Urgent! :)
Message
 
 
To
13/11/1998 10:36:48
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00157310
Message ID:
00160899
Views:
12
>>Hi,
>> I wanted to display a form for data entry. I found that I needed to enable my menus and thus I had to make the form modeless. However, when I called DO FORM, the form just momentarily appeared and then disappeared. Help. What should I do?
>>
>> I am porting on old FP 2.x program into VFP5.0 / VFP6.0.
>>
>>Any reply would be a great help!
>>
>>Thanks
>>Ian

>It might be two different problems here. Firstly, your application should have READ EVENTS in root. I believe you have it already because otherwise you could not use modeless forms at all. Another thing is to provide proper scope for Form object, i.e. if you call a form from outside procedure, e.g. menu option, then in simple case (DO FORM MyForm), MyForm will exist as long as procedure lives, i.e. when procedure finished the form itself is gone (actually you see form flashing and disappearing). To prevent this you should link your form object to higher level object property, e.g. application object:
DO FORM MyForm NAME oApp.MyForm LINKED
Here, you form will exists as long as app objects lives, unless you purposedly close it.

I have had the same problem as Ian. Want to understand your reply. Should there be a name after the LINKED? In your example, what is MyForm linked to?

Thanks - Brenda
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform