Assuming what you really want is to keep track of the current active Button:
private Button ActiveButton = null;
private void Buttons_Click(object sender, EventArgs e)
{
ActiveButton = sender as Button;
if (ActiveButton is null) throw new NullReferenceException("that's not a Button");
}
To go beyond this, I would need to know more about what the buttons do. Can more than one Button be active ? Right now, your code could keep adding "active" to a button tag with each click: that makes no sense.
If a Button loses focus, do you need to track that in code ?
Suggestion: use a Dictionary:
Dictionary<string, Button> BtnNameToButton = new Dictionary<string, Button>();
private void Form1_Load(object sender, EventArgs e)
{
foreach (Button btn in this.Controls.OfType<Button>())
{
BtnNameToButton.Add(btn.Name, btn);
}
}