线程问题:想用一个线程去做显示某窗体,另一个线程去读写数据,读完之后关闭显示窗体 线程问题:线程去做显示某窗体,另一个线程去读写数据,读完之后关闭显示窗体。功能是这样的,点击某按钮,一个线程去弹出一个半透明的模式船体(窗体上就一张动态图片gif),一个线程去备份数据库数据,备份完成后,关闭模式窗体。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这个功能用 backgroundWorker就可以实现了 看看这个例子 直接使用委托BeginInvokeEndInvoke static Thread splash = null; static WaittingForm splashScreen = null; public static void showWaitForm() { splashScreen = new WaittingForm(); Application.Run(splashScreen); }按钮事件中splash = new Thread(new ThreadStart(showWaitForm)); splash.IsBackground = true; splash.ApartmentState = ApartmentState.STA; splash.Start(); Application.DoEvents(); //读数据库splash.Abort(); 关于treeview,帮看看哪里有问题。。初学者。。。 刚安装好的vs2010新建mvc网站显示未引用 在C#怎么获取系统时间到毫秒 Enterprise Library 3.1有人用没 求C#数据拟合源码 用VS2005做串口程序时,ComBox内内容改不掉是怎么回事? C#中报表问题? 初做项目,用户登录后权限判断问题 [50分求助];如何用c#讀取本地映射盤上的文件.急 都说善其行必先利其器,关于vs.net.... !!!求助:Winform程序做成系统服务后怎样实现界面交互?? C#如何解析JOSN数据
EndInvoke
static Thread splash = null; static WaittingForm splashScreen = null;
public static void showWaitForm()
{
splashScreen = new WaittingForm();
Application.Run(splashScreen);
}按钮事件中
splash = new Thread(new ThreadStart(showWaitForm));
splash.IsBackground = true;
splash.ApartmentState = ApartmentState.STA;
splash.Start();
Application.DoEvents();
//读数据库
splash.Abort();