Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 Tip (AddProperty function)
Message
From
29/10/1998 09:22:23
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00152205
Message ID:
00152260
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform