bool isChecked = false;
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButtonA = (RadioButton)sender;
isChecked = radioButtonA.Checked;
}
private void radioButton1_Click(object sender, EventArgs e)
{
RadioButton radioButtonA = (RadioButton)sender;
if (radioButtonA.Checked && !isChecked)
radioButtonA.Checked = false;
else
{
radioButtonA.Checked = true;
isChecked = false;
}
}
接下來 就看 幾個Contral 要用
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
this.radioButton1.Click += new System.EventHandler(this.radioButton1_Click);
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
this.radioButton2.Click += new System.EventHandler(this.radioButton1_Click);
要用自己++ 以此類推
