"Jan Warning" <ja*********@wanadoo.nl> schrieb:
That's what I started with, but as you say, I have access to all methods
and properties of the Control class and not to those of my own custom
classes.
I am afraid that I have to think about another solution.
You'll have to make sure the method exists in order to call it. What you
can do is adding the method to an interface and implement this interface by
all controls. Then you can check the sender's type using 'TypeOf...Is' ('If
TypeOf sender Is IFoo') and then cast to the interface type in order to be
able to call the method. If you don't want a common interface or base
class, you can use 'CallByName' to call a method/property/... by its name.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>