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

C#

 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 12:41
mvePIEBALDconsult26-Sep-10 12:41 
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 
Dear Coders.

I have a form, with a text box to allow a user to type a question, and a scrollable edit box that instantly relays the question.

Then, I send the typed question to my object, and it produces a responce (a bit like the AI webbots on here)

I want a delay while waiting for the responce, so it is more realistic.

I am using Thread.Sleep(3000) to produce a 3 second pause.

Now, this works fine EXCEPT, while the program is pausing, the text that the user has entered does not appear in the chat box.

once the pause has finished, the text AND the responce end up in the chat box at the same time.

So, when a user types a question, I would like it to appear straight away in the chat box, and only the reponse should be delayed.

I have tried moving the sleep function into every different call I make to see if it that but it makes no difference.

I even tried to call invalidate() on my edit box to update the display BEFORE I call sleep(), but again, no help.

Can anyone shed some light on this please?

Thank you
Steve
AnswerRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 3:04
professionalManfred Rudolf Bihy24-Sep-10 3:04 
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 

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.