sender.???

mevets

Member
Joined
Jun 22, 2006
Messages
17
Location
Northern, VA
Programming Experience
Beginner
I am trying to figure out how to decifer the .name, .tag, etc of a control that sent the user to a subroutine.

I know its something to the extent of
VB.NET:
Ctype(sender.name, string)
That ofcourse does not work, but an example I had and lost I think described the solution that way. Any suggestions?
 
If you know sender is Control, and this is the general kind of object you want to fetch from the methods sender parameter then:
VB.NET:
dim ctl as control = directcast(sender,control)
messagebox.show(ctl.Name)
 
Back
Top