>VFP RemoveProperty()

>We often use _screen.AddProperty() to access some global variables until here well but how to remove these variables ?

_screen.RemoProperty() not avaible 😦 at this point RemoveProperty() help us

You can use REMOVEPROPERTY( ) to remove properties, but not methods or events. You can use REMOVEPROPERTY( ) with object instances created from Visual FoxPro classes, COM classes, SCATTER…NAME command, _VFP, and _SCREEN.

Properties must be visibly Public, not Hidden or Protected and have been added to an instance of an object, typically using the ADDPROPERTY( ) function, the AddProperty method, or SCATTER…NAME command, so that they can be removed using REMOVEPROPERTY( ).

You cannot remove a property if it is a member of the class definition used to create the instance of the object.

REMOVEPROPERTY( ) function does not remove properties that are specific array elements. To remove an array, provide only the array name.

also you could use
AddProperty(_screen,"MyVar","Soykan") and RemoveProperty(_screen,"MyVar")
instead of


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s