// 启动线程
private void button2_Click(object sender, System.EventArgs e)
{
Thread receivex = new Thread(new ThreadStart(this.showwiindow));
receivex.Start();
Thread.Sleep(6000);
}
delegate void showwiindowHandler();
private void showwiindow()
{
if (this.InvokeRequired)
{
showwiindowHandler si = new showwiindowHandler(this.showwiindow);
this.BeginInvoke(si, new object[0]);
return; //这里要返回,把函数调用权交给this的创建线程
}
//这里是其它的代码 调用类似msn的消息提示窗口
Message form=new Message();
form.HeightMax=120;
form.WidthMax=148;
form.ScrollShow();
}