2009/01/20

cross thread for control handling in C#

P9200257 (by plateaukao)
Home.Chez moi

波紐~~~
mais c'est pas vraiment de poisson d'or.

****

In order to reduce the efforts of getting latest version of source codes from perforce server and compile it on the machine, I used the p4api .NET library in my program. However, it's a long process; so I have to use another thread to handle this task, and bring out the message sometimes to know current progress. I encountered a problem as the title says -- cross thread control handling. my task is done in a newly created thread; and the message will be printed in a listbox control, which is created by the main thread. To utilize the control in another thread, the delegation mechanism should be used. It's not so complicated. Here's a simple sample from codeproject.

http://www.codeproject.com/KB/cs/Cross_Thread.aspx

沒有留言:

張貼留言

中國 App 商業模式 -- 王泌

很有系統地介紹了中國近幾年比較大的幾十個 app,包含他們主要的商業模式,投資者,和特色在哪裡。對於想要了解中國 App (網路服務) 市場的人來說,會是個很好的入門書。雖然已經是兩三年前的資料了,這兩三年又有了很大的變化,但依然是個很好的起點。