2007年9月12日

一段软件更新程序(使用WinRar压缩包) (转)

摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using System.Net... 阅读全文

posted @ 2007-09-12 15:07 恋地高飞 阅读(262) 评论(0) 推荐(0) 编辑

线程Thread

摘要: //启动线程 thread = new Thread(new ThreadStart(HelloWorld)); thread.Start(); protected void HelloWorld() { string str ; Console.write("helloworld"); } } //杀死线程 if ( thread.IsAlive ) { thread.Abort... 阅读全文

posted @ 2007-09-12 11:22 恋地高飞 阅读(387) 评论(0) 推荐(0) 编辑

C#多线程操作界面控件的解决方案

摘要: C#2005后不再支持多线程直接访问界面的控件(界面创建线程与访问线程不是同一个线程),不过可以使用delegate来解决: 1. 声明一个delegate和定义一个delegate的实现函数 delegate void ShowProgressDelegate(int newPos); private void ShowProgress(int newPos) { // 判断是否在线程中访问... 阅读全文

posted @ 2007-09-12 10:51 恋地高飞 阅读(4679) 评论(2) 推荐(0) 编辑

导航