Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged MsgBox("CheckedChanged") End Sub Private Sub CheckBox1_CheckStateChanged(ByVal sender As Object,ByVal e As System.EventArgs) Handles CheckBox1.CheckStateChanged MsgBox("CheckStateChanged") End Sub
点运行,当你取消和选中时,会发现CheckedChanged和CheckStateChanged都会弹出,但是CheckedChanged会优先。
所以,如果可能,尽量采用CheckedChanged