Say I wanted a messagebox to come up when a textbox or radiobutton was clicked. I want the messagebox to display the name of what was clicked(ie: textbox was clicked)
this is what I have so far but it's not displaying the textbox name, it displays "system.windows.forms.textBox" which is not what I'm looking for.
Private Sub txtBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles txtBox.Click
Dim txtTemp As TextBox = DirectCast(sender, TextBox)
'Dim rdoTemp As RadioButton = DirectCast(sender, RadioButton)
'Dim btnTemp As Button = DirectCast(sender, Button)
MessageBox.Show(sender.GetType().ToString)
I know I'm probably just missing something really simple but I can't seem to figure it out. Any help would be appreciated.