2
Answers

How can I set a property associated with a Control onClick when the subroutine is used by multiple Controls?

Photo of Joseph Stanish

Joseph Stanish

18y
2.9k
1

I have several PictureBox controls that all call the same subroutine on a CLICK event.  The Delegate subroutine looks like this: (where sender is the PictureBox control that was clicked.

private
void AnyPicture_Click(object sender, EventArgs e) {}

How acheive sender.BackColor = Color.Red when any of several PictureBox controls could have raised this CLICK event?

Answers (2)