Click here to Skip to main content
15,904,416 members
Home / Discussions / C#
   

C#

 
AnswerRe: 'using' keyword question Pin
Giorgi Dalakishvili12-Oct-08 21:01
mentorGiorgi Dalakishvili12-Oct-08 21:01 
GeneralRe: 'using' keyword question Pin
Programm3r12-Oct-08 21:14
Programm3r12-Oct-08 21:14 
GeneralRe: 'using' keyword question Pin
Giorgi Dalakishvili12-Oct-08 21:20
mentorGiorgi Dalakishvili12-Oct-08 21:20 
AnswerRe: 'using' keyword question Pin
Ashfield12-Oct-08 21:01
Ashfield12-Oct-08 21:01 
GeneralRe: 'using' keyword question Pin
Programm3r12-Oct-08 21:15
Programm3r12-Oct-08 21:15 
AnswerRe: 'using' keyword question Pin
Guffa12-Oct-08 21:20
Guffa12-Oct-08 21:20 
GeneralRe: 'using' keyword question Pin
Programm3r12-Oct-08 21:42
Programm3r12-Oct-08 21:42 
QuestionSending Keystroke To particular window of other application Pin
Sandeep Kalra12-Oct-08 20:39
Sandeep Kalra12-Oct-08 20:39 
Hi All

I want to send a Keystroke to the window of other application.

I have got the Handle of that window.
Is there any API or Managed C# code which will directly send the Keystroke only to that window.

setting the window to foreground and then sending the keystroke is working fine.But in the meantime if the user click on other window that window becomes active and the keystrokes are send to that window not to that window for which it was meant.

I have also studied about SendMessage Api

SendMessage Function
Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
To send a message and return immediately, use the SendMessageCallback or SendNotifyMessage function. To post a message to a thread's message queue and return immediately, use the PostMessage or PostThreadMessage function.
Syntax

LRESULT SendMessage(
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);


But i do not know how to put Keystrokes input into msg variable


Does anybody know how to send only to particular window?


Thanks in advance


THE SK
(Sandeep Kalra)
I am the One
AnswerRe: Sending Keystroke To particular window of other application Pin
Simon P Stevens12-Oct-08 22:29
Simon P Stevens12-Oct-08 22:29 
Questionwrite a structure to process memory using WriteProcessMemory() Pin
Xmen Real 12-Oct-08 20:10
professional Xmen Real 12-Oct-08 20:10 
AnswerRe: write a structure to process memory using WriteProcessMemory() Pin
Guffa12-Oct-08 20:36
Guffa12-Oct-08 20:36 
GeneralRe: write a structure to process memory using WriteProcessMemory() Pin
Xmen Real 13-Oct-08 3:00
professional Xmen Real 13-Oct-08 3:00 
GeneralRe: write a structure to process memory using WriteProcessMemory() Pin
Guffa13-Oct-08 4:06
Guffa13-Oct-08 4:06 
GeneralRe: write a structure to process memory using WriteProcessMemory() Pin
Xmen Real 13-Oct-08 4:11
professional Xmen Real 13-Oct-08 4:11 
QuestionWindows Services Pin
Piyush Vaishnav12-Oct-08 20:00
Piyush Vaishnav12-Oct-08 20:00 
AnswerRe: Windows Services Pin
Jaffer Mumtaz12-Oct-08 20:53
Jaffer Mumtaz12-Oct-08 20:53 
GeneralRe: Windows Services Pin
Piyush Vaishnav12-Oct-08 21:56
Piyush Vaishnav12-Oct-08 21:56 
GeneralRe: Windows Services Pin
Giorgi Dalakishvili12-Oct-08 23:08
mentorGiorgi Dalakishvili12-Oct-08 23:08 
GeneralRe: Windows Services Pin
Piyush Vaishnav12-Oct-08 23:16
Piyush Vaishnav12-Oct-08 23:16 
GeneralRe: Windows Services Pin
Giorgi Dalakishvili12-Oct-08 23:20
mentorGiorgi Dalakishvili12-Oct-08 23:20 
Questionpaging control in C# windows application Pin
Member 398136612-Oct-08 19:02
Member 398136612-Oct-08 19:02 
AnswerRe: paging control in C# windows application Pin
Ashfield12-Oct-08 21:04
Ashfield12-Oct-08 21:04 
QuestionC# client-server application using xml file to transfer by http format Pin
pcbaby1512-Oct-08 18:28
pcbaby1512-Oct-08 18:28 
AnswerRe: C# client-server application using xml file to transfer by http format Pin
pcbaby1519-Oct-08 18:04
pcbaby1519-Oct-08 18:04 
GeneralRe: C# client-server application using xml file to transfer by http format Pin
pcbaby1530-Oct-08 22:38
pcbaby1530-Oct-08 22:38 

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.