【发布时间】:2011-10-12 15:13:48
【问题描述】:
在我的主表单加载之前,它会要求用户检查更新。当他们点击确定时,我会显示主窗体并制作一个包含一些标签和一个带有动画 gif 的图片框的面板。
动画 gif 没有移动,这通常是因为主线程很忙,但我已经线程化了线程来做这项工作,但没有运气让动画播放。
这就是我所拥有的。
Thread CheckVersion = new Thread(new ThreadStart(VersionCheck));
this.Show(); //bring up the main form
this.BringToFront();
pCheckingVersions.Visible = true; //this contains the animated gif
Application.DoEvents(); //refresh ui so my box
CheckVersion.Start(); //start thread
CheckVersion.Join(); //wait for thread to exit before moving on
pDownloading.Visible = false;
【问题讨论】:
标签: c# winforms multithreading picturebox animated