Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 Tip (AddProperty function)
Message
De
29/10/1998 09:22:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00152205
Message ID:
00152260
Vues:
17
>I have started using the AddProperty() function to add properties to _screen as a convenience during development. In my VFPSTART.prg that runs every time I launch VFP has commands to add some default properties.
>
>I use UNC paths quite frequently, so I have something like:
>   _screen.addproperty('UNC1', '\\Srv1\Vol2\Apps\Travel')    _screen.addproperty('UNC2', '\\Srv1\Vol2\Apps\Staff')
>This sure beats losing memory variables I may create then lose if I issue a *CLEAR ALL* or lose them when I test run an app that clears or resets any memory variables after shutdown.

This is pretty cool. It also means that you can add a property to store an object reference that will persist through a RELEASE ALL. I can

_SCREEN.AddProperty('oShell',CREATEOBJECT('Shell.Application'))
release all && ain't no thang
_Screen.Shell.Open('mailto:esmoore@flash.net')

_screen.Shell persists as a way to use Shellexecute with one line.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform