0

A curious thing, is there a reason that you can't declare sender as a specific type? For instance, if you had a number of textboxes and you wanted each one to select all it's text when you click on it could you use :

    Public Sub TextBox_Click(ByVal sender As TextBox, ByVal e As System.EventArgs)
        sender.SelectAll()
    End Sub

and add it as the Click Event handler to each textbox.

It seems kind of obvious to me, and it does work. But I'm wondering if there is something deep inside visual studio that'll get screwed up.

Edited by tinstaafl

3
Contributors
3
Replies
8
Views
4 Years
Discussion Span
Last Post by Reverend Jim
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.