关于C#如何关闭当前窗口打开另一个窗口 注意当前窗口是主窗口,不说什么this.close() this.hide() 什么的如果close的话 那所有窗口都关了 hide的话 关闭第二个的时候 程序还在运行第二个窗口的关闭代码应该写在那里 第二个窗口没有关闭按钮 只能按那个X 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 using System.Threading;Thread th=new Thread(delegate(){new YourForm().ShowDialog();});th.Start();结贴率:0.00% Application.Run(new Form1());Application.Run(new Form2());这样第一个关闭了第二个接着运行.. 可以使用thread或者是那个backgroundworker。 private void Button1_Click(object sender, EventArgs e) { System.Threading.Thread thrT = new System.Threading.Thread(new System.Threading.ThreadStart(NewForm)); thrT.Start(); while (thrT.ThreadState != System.Threading.ThreadState.Running) ; this.Close(); } private void NewForm() { Application.Run(new Form2()); } 无法添加应用 读取字符 对listbox中的items进行筛选 急救C#问题,高分感谢!!! 如何对listView的某列进行排序? 我打算去深圳,有没有朋友给点建议? 在线等,grid控件如何才能设置多行页眉? C# 汇总合计算数据代码问题 如何获取.asp网页内容? 关于用System.IO读写ttf字体文件的问题 xml的更新操作!请大家帮忙解决 问个LINQ比如我表A中有DATE字段。我想按日分组,怎么写? group by的问题
th.Start();结贴率:0.00%
Application.Run(new Form2());这样第一个关闭了第二个接着运行..
{
System.Threading.Thread thrT = new System.Threading.Thread(new System.Threading.ThreadStart(NewForm));
thrT.Start();
while (thrT.ThreadState != System.Threading.ThreadState.Running) ;
this.Close();
} private void NewForm()
{
Application.Run(new Form2());
}