Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ImageList Control - KeyExists() procedure
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00662237
Message ID:
00662681
Views:
18
>>>Anyone know quick way to determine if a key exists in an ImageList control?
>>>
>>>Tried to do the following but getting the error message "OLE IDispatch exception code 0 from ListImages: Element not found.."
>>>
>>>loImage = toImageList.ListImages(lcIconKey)
>>>
>>
>>You can either use local error handler or write wrapper class to intercept that error.
>
>I want to avoid error trapping...
>
>I figured it out with a little more thought. The old reliable TYPE() function did the trick.
>
>
>
>IF NOT TYPE("toImageList.ListImages('"+lcIconKey+"')") = 'O'
>
>
Cool.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform