detect a click on another userControl than the current one
I have created a session selector for a project. The sessions are represented by userControl and its dynamically positioned in a panel I would like that when I press a UserControl of a session, this one changes it backColor into a color and that when another userControl than this one is selected that the color is removed on the current userControl and put on the new one I don't know if it's very clear, but here's what I tried to do: private void UserControl_Seance_Click(object sender, EventArgs e) { isClicked = true; this.BackColor = Color.Blue; } But the code stops there because I have no idea how to detect a click on another UserControl than this one Does anyone have a solution to detect a click on another userControl than the current one? Thank you.