[Solved] How do I tell which control the mouse has been clicked over?

[ad_1]

You can use the Tag property of each control. So set it to something meaningful and on Click event do something like this:

(sender As Control).Tag

EDIT: Also you may do this:

foreach (Control item in this.Controls)     //this IS YOUR CURRENT FORM
{
    if ((sender as Control).Equals(item))
    {
        //Do what you want
    }
}

1

[ad_2]

solved How do I tell which control the mouse has been clicked over?