-
Need to know what kind of control is ...
[Originally posted by Marco Negri]
Hi.
I have a sub that have an argument of type Object.
Into the sub, I would like to test if the object
support the PaintPicture method, but I dont know how.
Thanks for any help.
-
Re:Need to know what kind of control is ...
[Originally posted by reggx]
Why don't you put On Error Resume Next, then try to execute the PaintPicture method and trap for Err.Number equal to zero.ÿ If Err.Number is zero then PaintPicture would be a valid method of the Object.
-
Re:Re:Need to know what kind of control is ...
[Originally posted by Marco Negri]
Thank you very much.
I will try your suggest; another choice I found on a book is using the statement " If TypeOf obj Is
(Control) Then "; it also work well.
Bye
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|