|
-
Jun 8th, 2000, 05:10 AM
#1
Thread Starter
New Member
Is there another way to find the type of an object other than the TypeOf statement? If I check for types of controls that aren't included in the project, it generates an error which can't be handled. I've considered using the Object object and just try every property (.Text, .Caption etc) but that seems kind of sloppy. Any suggestions?
Thanks.
Drew
-
Jun 8th, 2000, 05:14 AM
#2
Why can't the Error be handled? Try placing an On Error Resume Next at the top of your code and test it out.
-
Jun 8th, 2000, 05:38 AM
#3
transcendental analytic
the typof syntax is
If TypeOf MyControlinstance Is MyControltype Then
what do you have?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 8th, 2000, 05:43 AM
#4
transcendental analytic
TypeName(Controlinstance) returns the type name
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 9th, 2000, 12:39 AM
#5
Thread Starter
New Member
Thanks kedaman, that solved my problem.
-
Jun 9th, 2000, 12:54 AM
#6
Thread Starter
New Member
Megatron: It's not a runtime error, it's a compile error.
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
|
Click Here to Expand Forum to Full Width
|