this.invoke(new Action


private void CheckA() { System.Threading.ThreadPool.QueueUserWorkItem(t => { ShowInfo("检测开始....."); System.Threading.Thread.Sleep(3000); ShowInfo("暂停3秒结束....."); System.Threading.Thread.Sleep(2000); ShowInfo("暂停2秒结束....."); System.Threading.Thread.Sleep(1000); ShowInfo("检测结束"); }); } private void ShowInfo(string Info) { listView1.Invoke(new Action(() => { listView1.Columns[0].Width = listView1.ClientSize.Width; listView1.Items.Insert(0, new ListViewItem(Info)); })); }



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM