Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: accessing C API from C# Pin
Richard MacCutchan25-Mar-10 2:14
mveRichard MacCutchan25-Mar-10 2:14 
GeneralRe: accessing C API from C# Pin
Luc Pattyn25-Mar-10 3:00
sitebuilderLuc Pattyn25-Mar-10 3:00 
Questionhow to empty textbox in a groupbox Pin
crisjala24-Mar-10 16:22
crisjala24-Mar-10 16:22 
AnswerRe: how to empty textbox in a groupbox Pin
Not Active24-Mar-10 16:23
mentorNot Active24-Mar-10 16:23 
AnswerRe: how to empty textbox in a groupbox Pin
Khaniya24-Mar-10 18:33
professionalKhaniya24-Mar-10 18:33 
GeneralRe: how to empty textbox in a groupbox Pin
crisjala24-Mar-10 20:47
crisjala24-Mar-10 20:47 
QuestionMessage Removed Pin
24-Mar-10 13:50
user20524-Mar-10 13:50 
AnswerRe: Event Pin
Luc Pattyn24-Mar-10 14:13
sitebuilderLuc Pattyn24-Mar-10 14:13 
Sam205 wrote:
force the worker thread to wait while each event gets processed


what do you mean by "the worker thread"?

The main thread (a.k.a. GUI thread) is the one executing event handlers such as a Button_Click() method. When you want extra threads, you create them by instantiating Thread class, or by calling ThreadPool methods, or by instantiating BackgroundWorker class. All of them are supposed to:
1. not interfere with the main thread
2. not touch GUI Controls, as only the main thread should be allowed to touch them.

Getting another thread to access the Controls anyway requires a special technique as described here[^] . When Control.Invoke gets called, the caller effectively will be blocked until the GUI thread has executed the invoked method.

I hipe that is what you need.

Smile | :)

AnswerRe: Event Pin
Not Active24-Mar-10 15:11
mentorNot Active24-Mar-10 15:11 
AnswerRe: Event Pin
PIEBALDconsult24-Mar-10 16:10
mvePIEBALDconsult24-Mar-10 16:10 
GeneralRe: Event Pin
#realJSOP25-Mar-10 0:00
mve#realJSOP25-Mar-10 0:00 
GeneralRe: Event Pin
PIEBALDconsult25-Mar-10 3:56
mvePIEBALDconsult25-Mar-10 3:56 
AnswerRe: Event Pin
#realJSOP25-Mar-10 0:01
mve#realJSOP25-Mar-10 0:01 
Questioncreate Microsoft report from XML Pin
Jassim Rahma24-Mar-10 13:17
Jassim Rahma24-Mar-10 13:17 
AnswerRe: create Microsoft report from XML Pin
Not Active24-Mar-10 15:09
mentorNot Active24-Mar-10 15:09 
Questionassociate file extension Pin
Jassim Rahma24-Mar-10 12:13
Jassim Rahma24-Mar-10 12:13 
AnswerRe: associate file extension Pin
Not Active24-Mar-10 12:45
mentorNot Active24-Mar-10 12:45 
GeneralRe: associate file extension Pin
Jassim Rahma24-Mar-10 12:50
Jassim Rahma24-Mar-10 12:50 
GeneralRe: associate file extension Pin
Eslam Afifi24-Mar-10 13:47
Eslam Afifi24-Mar-10 13:47 
Questioncreate a My Document Sub Directory Pin
Jassim Rahma24-Mar-10 12:12
Jassim Rahma24-Mar-10 12:12 
AnswerRe: create a My Document Sub Directory Pin
Eslam Afifi24-Mar-10 13:33
Eslam Afifi24-Mar-10 13:33 
Questiondetect changes in MDIs and save it Pin
Jassim Rahma24-Mar-10 12:11
Jassim Rahma24-Mar-10 12:11 
AnswerRe: detect changes in MDIs and save it Pin
Not Active24-Mar-10 15:30
mentorNot Active24-Mar-10 15:30 
AnswerRe: detect changes in MDIs and save it Pin
Dave Kreskowiak24-Mar-10 15:33
mveDave Kreskowiak24-Mar-10 15:33 
QuestionDeserialization problems: System.Drawing.Color Pin
Alan Balkany24-Mar-10 11:17
Alan Balkany24-Mar-10 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.