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:
DO System.app
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.