Click here to Skip to main content
15,914,419 members
Home / Discussions / C#
   

C#

 
QuestionSystem.Transaction , please Pin
faviochilo17-Feb-06 4:55
faviochilo17-Feb-06 4:55 
AnswerRe: System.Transaction , please Pin
Judah Gabriel Himango17-Feb-06 10:22
sponsorJudah Gabriel Himango17-Feb-06 10:22 
GeneralRe: System.Transaction , please Pin
faviochilo18-Feb-06 14:09
faviochilo18-Feb-06 14:09 
QuestionIP Address to System.Byte Pin
Ariston Darmayuda17-Feb-06 4:52
Ariston Darmayuda17-Feb-06 4:52 
AnswerRe: IP Address to System.Byte Pin
Judah Gabriel Himango17-Feb-06 10:23
sponsorJudah Gabriel Himango17-Feb-06 10:23 
AnswerRe: IP Address to System.Byte Pin
Guffa17-Feb-06 12:22
Guffa17-Feb-06 12:22 
QuestionThread.Sleep Executing at Wrong Time Pin
redfish3417-Feb-06 4:35
redfish3417-Feb-06 4:35 
AnswerRe: Thread.Sleep Executing at Wrong Time Pin
Dave Kreskowiak17-Feb-06 5:35
mveDave Kreskowiak17-Feb-06 5:35 
This "oddness", as you call it, is because you don't understanding how Windows works.

You're using SendKeys to post keyboard messages (hint, hint) to your own form. OK, great! You've posted these messages, but since your very next statement puts your forms' execution thread to sleep, the message processing loop of your form (otherwise known as WndProc) can't process those messages, send the keystrokes to the TextBox, and let the TextBox repaint itself, until Thread.Sleep returns. As a quick'n'dirty "fix", you might want to let that stuff happen before you put your thread to sleep:
KeysAuto keysAuto = new KeysAuto();
keysAuto.SendKeys("This is a test.{ENTER}Second Line.{ENTER}");
Application.DoEvents();
Thread.Sleep(1000);
keysAuto.SendKeys("This is a test #2.{ENTER}Second Line.{ENTER}");

Application.DoEvents() will let your form process all pending messages before the next line executes.



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Thread.Sleep Executing at Wrong Time Pin
redfish3417-Feb-06 19:09
redfish3417-Feb-06 19:09 
GeneralRe: Thread.Sleep Executing at Wrong Time Pin
Dave Kreskowiak18-Feb-06 3:39
mveDave Kreskowiak18-Feb-06 3:39 
Questiondoubt about listbox Pin
ffrr17-Feb-06 4:24
ffrr17-Feb-06 4:24 
Questionevent handler problem (a lv created in usercontrol and displayed in a child form) Pin
nycadr17-Feb-06 3:51
nycadr17-Feb-06 3:51 
AnswerRe: event handler problem (a lv created in usercontrol and displayed in a child form) Pin
J4amieC17-Feb-06 4:03
J4amieC17-Feb-06 4:03 
Questionevent handler problem (a listview created in a usercontrol and displayed in a child form) Pin
nycadr17-Feb-06 3:49
nycadr17-Feb-06 3:49 
Questionevent handler problem (a listview created in usercontrol and displayed in a child form ) Pin
nycadr17-Feb-06 3:47
nycadr17-Feb-06 3:47 
QuestionUse of oRTP in C#.Net Pin
Divyang Mithaiwala17-Feb-06 3:39
Divyang Mithaiwala17-Feb-06 3:39 
AnswerRe: Use of oRTP in C#.Net Pin
Judah Gabriel Himango17-Feb-06 4:48
sponsorJudah Gabriel Himango17-Feb-06 4:48 
QuestionClearing a data binded image Pin
Chals17-Feb-06 2:49
Chals17-Feb-06 2:49 
GeneralC# asp.net Pin
Jijo BP17-Feb-06 2:40
Jijo BP17-Feb-06 2:40 
GeneralRe: C# asp.net Pin
toxcct17-Feb-06 2:44
toxcct17-Feb-06 2:44 
GeneralRe: C# asp.net Pin
benjymous17-Feb-06 2:46
benjymous17-Feb-06 2:46 
JokeRe: C# asp.net Pin
Nish Nishant17-Feb-06 2:47
sitebuilderNish Nishant17-Feb-06 2:47 
GeneralRe: C# asp.net Pin
Le centriste17-Feb-06 2:50
Le centriste17-Feb-06 2:50 
GeneralRe: C# asp.net Pin
Ray Kinsella17-Feb-06 2:51
Ray Kinsella17-Feb-06 2:51 
GeneralRe: C# asp.net Pin
Daniel Turini17-Feb-06 2:55
Daniel Turini17-Feb-06 2:55 

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.