RadioButton1的CheckedChanged事件问题
在窗体中加入了以个radiobutton,也写了checkedchanged事件处理程序,代码如下:
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged Dim f2 As New Form2() Me.Close() f2.Show() End Sub
Thread th = new Thread(new ThreadStart( delegate { this.Invoke(new MethodInvoker(delegate { this.Close(); })); Form2 fm = new Form2(); Application.Run(fm); })); th.Start();
[解决办法]
先要有个主窗体,然后操作子窗体就没有这个问题了