Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding table to a form from a class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00045276
Message ID:
00045608
Vues:
40
>>>I have made an .SCX based on my class, run with a DO FORM. I could make a subclass for this specific use, with my table build in, but it seems like I shouldn't have to do that.
>>
>>Bret,
>>
>>You can pass parameters to the fomr's Init to tell what tables to open. If you open the table in the Init then you'll need to make all of the controlsources blank to prevent errors as the controls instantiate. They get created before the Form's Init runs so in the Init after you open your table you will neeed to set the controlsources for the objects in the form.
>That should work fine for my task. I'm still interested in the general problem of how you use data environments when you instantiate a form from a class not intended for any specific table. I would also like to know if a form instantiated from a class has to be modal in order to stay on the screen. That doesn't sound right.
Bret,

You can create the DE in code in the form class Load event.

The fomr does not need to be modal, there is something else going on for you that makes that form go away. It could be that the variable goes out of scope on you.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform