Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Vfp VS _screen
Message
 
To
23/01/2008 11:03:57
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01284500
Message ID:
01284580
Views:
14
Hi Lim,

>My question is why not _VFP?
>Can I or should I add a property or object to _VFP instead of _SCREEN.

The main difference between these variable (besides the obvious) is that _VFP is an OLE Object and _SCREEN is a VFP Object. You can use either one, but if you use _SCREEN you get the benefit of your property being visible during design time, while editing your code. Whereas a property added to _VFP is only visible in the debug window and command window.

Adding your object as a _SCREEN property can be a huge advantage while developing. This worked out really well for us on the GDIPlusX project. (http://www.codeplex.com/VFPX/Wiki/View.aspx?title=GDIPlusX)

We can reference the library, and get all the intellisense from a code window. ie:
* From the command window
DO System.app && (Adds "System" property to _SCREEN)

* From code window
oBMP = _SCREEN.System.Drawing.Bitmap.New(400,400)
oColor = _SCREEN.System.Drawing.Color.FromRGB(255,0,0)
I hope this helps. I'd also be interested in seeing your library.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform