lansh

首页 新随笔 联系 订阅 管理

2007年11月28日 #

摘要: [原文] Introduction The .NET framework provides a lot of ways to implement multithreading programs. I want to show how we can run a worker thread which makes syncronous calls to a user interface (for ... 阅读全文
posted @ 2007-11-28 10:29 lansh 阅读(482) 评论(0) 推荐(0)

摘要: 问题的产生: 我的WinForm程序中有一个用于更新主窗口的工作线程(worker thread),但文档中却提示我不能在多线程中调用这个form(为什么?),而事实上我在调用时程序常常会崩掉。请问如何从多线程中调用form中的方法呢? 解答: 每一个从Control类中派生出来的WinForm类(包括Control类)都是依靠底层Windows消息和一个消息泵循环(message pum... 阅读全文
posted @ 2007-11-28 10:23 lansh 阅读(387) 评论(0) 推荐(0)