Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regular Expression Pin
User 66585-Sep-08 6:38
User 66585-Sep-08 6:38 
QuestionWebRequest object crashes program Pin
Filmxposer5-Sep-08 3:44
Filmxposer5-Sep-08 3:44 
QuestionHow to internationalize AssemblyInfo strings? Pin
bscaer5-Sep-08 3:33
bscaer5-Sep-08 3:33 
QuestionHow can an event handler update the text in a TextBox when the GUI-thread is sleeping? Pin
arnold_w5-Sep-08 3:16
arnold_w5-Sep-08 3:16 
AnswerRe: How can an event handler update the text in a TextBox when the GUI-thread is sleeping? Pin
DaveyM695-Sep-08 3:44
professionalDaveyM695-Sep-08 3:44 
AnswerRe: How can an event handler update the text in a TextBox when the GUI-thread is sleeping? Pin
Nicholas Butler5-Sep-08 6:03
sitebuilderNicholas Butler5-Sep-08 6:03 
GeneralRe: How can an event handler update the text in a TextBox when the GUI-thread is sleeping? Pin
arnold_w7-Sep-08 21:23
arnold_w7-Sep-08 21:23 
GeneralRe: How can an event handler update the text in a TextBox when the GUI-thread is sleeping? Pin
Nicholas Butler7-Sep-08 23:48
sitebuilderNicholas Butler7-Sep-08 23:48 
arnold_w wrote:
it is impossible to write an updateGuiImmediatelyWithTheWrongThread()-method?


Yes, windows controls must be used from the thread that created them: the UI thread.

I think the way to do this is to implement a queue. When the button is pressed, put a command in the queue and let the UI thread return. Then have a background thread that takes commands from the queue and processes them. You don't want to create a thread for each command. Then publish an event or two for the UI to listen to, and use them to report back progress and completion status.

If you want professional advice with this, or someone to write it for you, please use the email link below this message to contact me directly.

If you want to learn about multi-threading, there is an excellent ( free ) ebook by Joseph Albahari here[^].

Nick

----------------------------------
Be excellent to each other Smile | :)

GeneralRe: How can an event handler update the text in a TextBox when the GUI-thread is sleeping? Pin
arnold_w8-Sep-08 0:34
arnold_w8-Sep-08 0:34 
QuestionConversion of object to dataset Pin
Santhosh Raj5-Sep-08 3:01
Santhosh Raj5-Sep-08 3:01 
AnswerRe: Conversion of object to dataset Pin
#realJSOP5-Sep-08 3:17
mve#realJSOP5-Sep-08 3:17 
GeneralRe: Conversion of object to dataset Pin
Santhosh Raj5-Sep-08 18:57
Santhosh Raj5-Sep-08 18:57 
GeneralRe: Conversion of object to dataset Pin
#realJSOP6-Sep-08 2:12
mve#realJSOP6-Sep-08 2:12 
QuestionGPS polygon and calculate of gps position is inside the polygon Pin
rnvrnv5-Sep-08 2:59
rnvrnv5-Sep-08 2:59 
AnswerRe: GPS polygon and calculate of gps position is inside the polygon Pin
DaveyM695-Sep-08 4:00
professionalDaveyM695-Sep-08 4:00 
AnswerRe: GPS polygon and calculate of gps position is inside the polygon Pin
Simon P Stevens5-Sep-08 4:09
Simon P Stevens5-Sep-08 4:09 
AnswerRe: GPS polygon and calculate of gps position is inside the polygon Pin
Colin Angus Mackay5-Sep-08 5:44
Colin Angus Mackay5-Sep-08 5:44 
Questiondrag and drop Pin
aiswaryasekhar5-Sep-08 1:48
aiswaryasekhar5-Sep-08 1:48 
AnswerRe: drag and drop Pin
Thomas Stockwell5-Sep-08 3:29
professionalThomas Stockwell5-Sep-08 3:29 
QuestionDelete all rows from datagridview Pin
NewToAspDotNet5-Sep-08 1:40
NewToAspDotNet5-Sep-08 1:40 
AnswerRe: Delete all rows from datagridview Pin
C1AllenS5-Sep-08 4:06
C1AllenS5-Sep-08 4:06 
GeneralRe: Delete all rows from datagridview Pin
NewToAspDotNet5-Sep-08 4:21
NewToAspDotNet5-Sep-08 4:21 
Questionnunit-console doesnt stop after test summary output Pin
buchstaben5-Sep-08 1:37
buchstaben5-Sep-08 1:37 
GeneralRe: nunit-console doesnt stop after test summary output Pin
buchstaben5-Sep-08 2:55
buchstaben5-Sep-08 2:55 
QuestionPlease help me.. Pin
vinay_K5-Sep-08 1:35
vinay_K5-Sep-08 1:35 

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.