Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Closes on Startup
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00410753
Message ID:
00410862
Vues:
10
>Hello,
>
>I'm trying to instantiate a form class with a pageframe on it. The first page of the pageframe has a grid on it whose recordsource is a view called v_contact. The second page of the grid contains text boxes, all of whose controlsource is the same view.
>
>When I instantiate this form with CreateObject and step through the debugger, the view is in the data session and has records. The form's Init() method completes and then immediately goes into the Destroy() method of the form.
>
>I've seen this behavior before, but I can't remember what causes it. Can anyone tell me what causes the form to instantly close like this?
>
>Thanks in advance,
>
>Ben Holton
>
>Conarc, Inc.

Is the form modal or is there a read events to hold it? If the variable you are assigning the object to looses scope then the form will be released (and destroyed.)

In other words, you create the form and assign to a variable using createobject. The form insantiates and then the code continues to execute from the calling procedure (provided the form is not modal) and when the calling procedure exits the variable loses scope and thereform the form goes away.

Does that make any sense, or am I completely wrong? I think that is how it works and sounds like your problem.
Paul R. Moon
Business Software Solutions
paul@businessoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform