版主:
我建立了6个RadioButton控件,如下:
Panel1上:RadioButton1,RadioButton2,RadioButton3
Panel2上:RadioButton4,RadioButton5,RadioButton6
我的想法是:点击Panel1上的RadioButton1,或者RadioButton2,或者RadioButton3时,都模拟点击(或者默认触发)RadioButton5控件。
因此,在RadioButton1,RadioButton2,RadioButton3的Click事件中,写了如下语句:
e.Form.Controls("RadioButton5").Select()
运行结果发现:RadioButton5的内容执行了3次,即在屏幕上闪动了3次。
但是我去掉RadioButton1,RadioButton2,RadioButton3的Click事件中的代码,手工点击RadioButton5控件时,只执行1次。
为什么自动执行e.Form.Controls("RadioButton5").Select()与人工点击RadioButton5控件的效果有差异呢?