Click here to Skip to main content
15,894,740 members
Home / Discussions / C#
   

C#

 
AnswerRe: WebService not returning Color Pin
PIEBALDconsult27-Sep-10 16:26
mvePIEBALDconsult27-Sep-10 16:26 
GeneralRe: WebService not returning Color Pin
Luc Pattyn28-Sep-10 2:35
sitebuilderLuc Pattyn28-Sep-10 2:35 
Questionvisual studio addin - recalc dependencies before a build Pin
Jim Crafton24-Sep-10 9:21
Jim Crafton24-Sep-10 9:21 
QuestionRe: visual studio addin - recalc dependencies before a build Pin
AspDotNetDev24-Sep-10 11:04
protectorAspDotNetDev24-Sep-10 11:04 
Questionconnecting acces with udl file Pin
Erdinc2724-Sep-10 3:47
Erdinc2724-Sep-10 3:47 
AnswerRe: connecting acces with udl file Pin
PIEBALDconsult24-Sep-10 11:34
mvePIEBALDconsult24-Sep-10 11:34 
Questioncreating a pause? Pin
stephen.darling24-Sep-10 2:52
stephen.darling24-Sep-10 2:52 
AnswerRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 3:04
professionalManfred Rudolf Bihy24-Sep-10 3:04 
You'll have to use a thread to do the waiting bit, because when your're using Thread.Sleep in an event handler
the GUI thread can't be used to do all the repainting stuff that is needed.
My advice is:

Start a thread that waits (WaitOne) on a WaitHandle (e.g. AutoResetEvent) to process a
Queue<string> obj (queue of strings). When a string is entered by the user it's put on the
queue and the WaitHandle is signaled. The thread will awaken take the first string on the queue
(after locking on it of course). After the thread released the lock on the queue it'll go to
sleep and after awaking from sleep write response into textbox (remember to use invoke when doing
stuff on the GUI from a thread different from the GUI thread). After writing to the textbox the
thread will do WaitOne.

Hope this helps! Smile | :)
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 3:12
stephen.darling24-Sep-10 3:12 
GeneralRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 3:25
professionalManfred Rudolf Bihy24-Sep-10 3:25 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 3:38
stephen.darling24-Sep-10 3:38 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 3:42
stephen.darling24-Sep-10 3:42 
GeneralRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 3:48
professionalManfred Rudolf Bihy24-Sep-10 3:48 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 4:13
stephen.darling24-Sep-10 4:13 
GeneralRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 4:30
professionalManfred Rudolf Bihy24-Sep-10 4:30 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 4:36
stephen.darling24-Sep-10 4:36 
GeneralRe: creating a pause? Pin
Saksida Bojan24-Sep-10 6:11
Saksida Bojan24-Sep-10 6:11 
AnswerRe: creating a pause? Pin
Luc Pattyn24-Sep-10 4:06
sitebuilderLuc Pattyn24-Sep-10 4:06 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 18:41
stephen.darling24-Sep-10 18:41 
GeneralRe: creating a pause? Pin
Luc Pattyn24-Sep-10 22:52
sitebuilderLuc Pattyn24-Sep-10 22:52 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 23:16
stephen.darling24-Sep-10 23:16 
AnswerRe: creating a pause? Pin
Ravi Bhavnani24-Sep-10 7:11
professionalRavi Bhavnani24-Sep-10 7:11 
GeneralRe: creating a pause? Pin
Jim Crafton24-Sep-10 9:24
Jim Crafton24-Sep-10 9:24 
GeneralRe: creating a pause? Pin
Ravi Bhavnani24-Sep-10 9:27
professionalRavi Bhavnani24-Sep-10 9:27 
GeneralRe: creating a pause? Pin
Ravi Bhavnani24-Sep-10 9:29
professionalRavi Bhavnani24-Sep-10 9:29 

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.