Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
AnswerRe: I need help. Pin
Richard MacCutchan2-Apr-12 1:56
mveRichard MacCutchan2-Apr-12 1:56 
AnswerRe: I need help. Pin
Abhinav S2-Apr-12 2:02
Abhinav S2-Apr-12 2:02 
QuestionHow to develop Voice activation detection in C#? Pin
Will19841-Apr-12 22:07
Will19841-Apr-12 22:07 
AnswerRe: How to develop Voice activation detection in C#? Pin
Richard Andrew x642-Apr-12 4:53
professionalRichard Andrew x642-Apr-12 4:53 
Questionremote pc via windows phone7 Pin
heba abu ghaleih22 1-Apr-12 21:58
heba abu ghaleih22 1-Apr-12 21:58 
AnswerRe: remote pc via windows phone7 Pin
Richard MacCutchan1-Apr-12 22:47
mveRichard MacCutchan1-Apr-12 22:47 
GeneralRe: remote pc via windows phone7 Pin
heba abu ghaleih22 1-Apr-12 23:03
heba abu ghaleih22 1-Apr-12 23:03 
QuestionMultiThreading + SendKeys.Send() Pin
Emptora1-Apr-12 14:47
Emptora1-Apr-12 14:47 
I am attempting to create a Windows Form application that will select a window based on it handle. No problem here doing that.

Afterwards, the I used Thread.Sleep() to buy some time, then use SendKeys.Send(). Of course, without doing the work here on another Thread, my UI will hang on my application while the Thread sleeps.

Therefore, I wanted to create another Thread, which I did, and encapsulate the above work (Thread.Sleep and SendKeys.Send) to a method and send it to the Thread. Unfortunately, the SendKeys doesn't end up sending any text as a result.

Am I missing something rather remedial here? Does the SendKeys() have to come from the primary thread? I am also selecting another window, not my application, for the SendKeys() to target.

C#
Thread oThread = new Thread(new ThreadStart(sendTheKeys());

//
// More code here not pertaining to the preceding Object.
//
//Some code not at all interacting with the following.

public static void sendTheKeys()
     {
         Thread.Sleep(5000);
         SendKeys.Send("Simple Text Message here!");
     }

AnswerRe: MultiThreading + SendKeys.Send() Pin
Luc Pattyn1-Apr-12 15:21
sitebuilderLuc Pattyn1-Apr-12 15:21 
GeneralRe: MultiThreading + SendKeys.Send() Pin
Emptora2-Apr-12 11:20
Emptora2-Apr-12 11:20 
AnswerRe: MultiThreading + SendKeys.Send() Pin
Luc Pattyn2-Apr-12 11:55
sitebuilderLuc Pattyn2-Apr-12 11:55 
GeneralRe: MultiThreading + SendKeys.Send() Pin
Emptora2-Apr-12 13:27
Emptora2-Apr-12 13:27 
AnswerRe: MultiThreading + SendKeys.Send() Pin
Luc Pattyn2-Apr-12 13:42
sitebuilderLuc Pattyn2-Apr-12 13:42 
GeneralRe: MultiThreading + SendKeys.Send() Pin
Emptora3-Apr-12 12:26
Emptora3-Apr-12 12:26 
AnswerRe: MultiThreading + SendKeys.Send() Pin
Luc Pattyn3-Apr-12 12:42
sitebuilderLuc Pattyn3-Apr-12 12:42 
Questiongeneric copy constructor Pin
andy_t_roo1-Apr-12 13:59
andy_t_roo1-Apr-12 13:59 
AnswerRe: generic copy constructor Pin
RobCroll1-Apr-12 15:03
RobCroll1-Apr-12 15:03 
QuestionEntity FrameWork, pass entity between forms Pin
mehdi00161-Apr-12 12:43
mehdi00161-Apr-12 12:43 
AnswerRe: Entity FrameWork, pass entity between forms Pin
RobCroll1-Apr-12 14:57
RobCroll1-Apr-12 14:57 
AnswerRe: Entity FrameWork, pass entity between forms Pin
Richard Andrew x641-Apr-12 17:23
professionalRichard Andrew x641-Apr-12 17:23 
QuestionEDM Pin
MemberDotNetting1-Apr-12 12:10
MemberDotNetting1-Apr-12 12:10 
AnswerRe: EDM Pin
Richard Andrew x641-Apr-12 17:22
professionalRichard Andrew x641-Apr-12 17:22 
Questionhow to reduce the size of exe File ... Pin
nassimnastaran1-Apr-12 8:41
nassimnastaran1-Apr-12 8:41 
AnswerRe: how to reduce the size of exe File ... Pin
DaveyM691-Apr-12 9:45
professionalDaveyM691-Apr-12 9:45 
AnswerRe: how to reduce the size of exe File ... Pin
RobCroll1-Apr-12 14:46
RobCroll1-Apr-12 14:46 

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.