Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form flashed and disappered
Message
From
29/07/2002 06:44:14
 
 
To
27/07/2002 13:18:54
Irv Adams
MSC Managed Care, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00682995
Message ID:
00683448
Views:
42
>You're absolutely right, Marcia; READ EVENTS is sufficient. The problem must have another cause...
>
>-Irv.
>
>>Hello Irv.
>>
>>The variable used to 'Link' with the form must have PUBLIC scope either through declaration or association with a Global App Object, etc. The variable goes out of scope and takes the Form with it.
>>
>>I'm sorry, but you are mistaken here. Because the READ EVENTS command is issued immediately after the DO FORM, the variable should stay in scope and the form should still be there.

Except this:
Your form is not modal and you do not have read events at the end of your main PRG.
Add the following lines to your main.prg:
ON SHUTDOWN CLEAR EVENTS
READ EVENTS
ON SHUTDOWN
You should also ensure that form's name property is the same with the SCX filename that stores the form. You can also create a public variable with the same name on the forms load, and assign form's refference to it, if you wish to have only one instance of the form, but not modal. Add this code to your form's Load event in this case:
Local lcThisFormName
lcThisFormName = ThisForm.Name
Public &lcThisFormName
&lcThisFormName = ThisForm
HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform