Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to test for the existance of an object
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00026039
Message ID:
00026044
Views:
34
>Is there any way to test for the existence of an object programatticaly?
>
>For example, if I was going to change the color of THISFORM.lblMyTitle with the command THISFORM.lblMytitle.ForeColor = RGB(255,0,0), can I test for the existence of THISFORM.lblMytitle first so as to avoid a possible crash?

IF TYPE("ThisForm.lblMyTitle.Name") == "C"
* object exists
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform