原文地址:http://blog.csdn.net/surgent/article/details/5937978
代码:
- private void ThreadFunc()
- {
- MethodInvoker mi = new MethodInvoker(this.ShowMsgForm);
- this.BeginInvoke(mi);
- }
- private void ShowMsgForm()
- {
- MsgForm msg = new MsgForm();
- msg.Show();
- }
- private void button1_Click(object sender, System.EventArgs e)
- {
- FormThread = new Thread(new ThreadStart(ThreadFunc));
- FormThread.Start();
- }