Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reset path database
Message
 
 
À
06/12/2001 07:34:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00590433
Message ID:
00591849
Vues:
24
>Hi all,
>I want to reset the path where my database is stored.
>The application-object has the datapath stored to a property.
>The application-object is not public. I passes to the forms as a parameter.
>How can I acces this property from a Form load-event?
>I start my forms with oApp.doform("myform",with this")
>This methods contains a line like this "Do form ¶1 ¶2"

Hi Jim,

The parameters are passed to the form's Init event and the Load event wouldn't see them because it fires before Init. You can keep an reference to your application object in the property of the _SCREEN object. This way the Load of the form would have access to it and you don't have to pass it as a parameter to the form.
* In the main program
oApp = Createobject( ... )
_Screen.Addproperty("oApp", oApp)
...
* Load of the form
* Save to the form's property to use it later anywhere in the form w/o reference to the _screen
Thisform.oApp = _Screen.oApp
...
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform