bool _4modal;
Form2 frm;
private void button1_Click(object sender, System.EventArgs e)
{
try
{
Thread t = new Thread(new ThreadStart(_4_Excute));
t.Start();
Thread.CurrentThread.Join(500);
t.Abort();
while(!_4modal) { Thread.CurrentThread.Join(100); }
}
catch{}
}
public void _4_Excute()
{
try
{
frm=new Form2();
frm.Text="helloworld";
frm.ShowDialog();
}
catch{}
finally
{
_4modal=true;
}
}
Form2 frm;
private void button1_Click(object sender, System.EventArgs e)
{
try
{
Thread t = new Thread(new ThreadStart(_4_Excute));
t.Start();
Thread.CurrentThread.Join(500);
t.Abort();
while(!_4modal) { Thread.CurrentThread.Join(100); }
}
catch{}
}
public void _4_Excute()
{
try
{
frm=new Form2();
frm.Text="helloworld";
frm.ShowDialog();
}
catch{}
finally
{
_4modal=true;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货