A google search for "winforms checkbox event" yields this as its first result:
MSDN: CheckBox.CheckedChanged Event
At some point, they mention:
To run the example code, paste it into a project that contains an instance of type CheckBox named CheckBox1. Then ensure that the event handler is associated with the CheckedChanged event.
(Emphasis mine.)
Unfortunately, they don't show how to "ensure that the event handler is associated with the CheckedChanged event".
In short, somewhere within your code you have to have the following statement:
CheckboxPicture.CheckedChanged += CheckboxPicture_CheckedChanged
In other words, your CheckboxPicture_CheckedChanged()
method will not be called by magic, you have to make sure it gets called when the corresponding event of the checkbox is fired.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…