Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to run a form saved as a class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00400258
Message ID:
00400985
Views:
21
Jim , thanks for your reply. What you say makes complete sense and I will give it a try.

Regards,
Gerard


,
>
>You cannot have more than one read events in effect. Any others are ignored after the first one.
>
>Your problem is the scoping of the variable holding the form reference. loForm is being created as a private variable and goes out of scope as soon as the method ends. To get the scoping right you need to ask the question of how long is this new form supposed to hang around. One approach might be to create a form property named oReportForm, then use this code in the button's click;
>
>
>WITH Thisform
>   .oReportForm = CreateObject("frmReport")
>   .oReportForm.Show()
>ENDWITH
>
>
>Be sure to put this code in the destroy of the calling form;
>
>
>Thisform.oReportForm = NULL
>
>
>This will put the form object reference into a form property and it will not go out of scope when your button code ends.
Previous
Reply
Map
View

Click here to load this message in the networking platform