Use SendMessage in C# to perform a CTRL-C operation on a given handle

Posted by gtaborga on Stack Overflow See other posts from Stack Overflow or by gtaborga
Published on 2010-04-01T21:05:04Z Indexed on 2010/04/01 21:13 UTC
Read the original article Hit count: 362

Filed under:
|
|
|

Hello everyone,

I'm trying to perform a (CTRL-C) copy on a window. I've already managed to do this using SendInput but unfortunately that could fail if the window doesn't have focus. I'm trying to perform the same (CTRL-C) operation using SendMessage in C#.

So far I haven't been successful in getting the WPARAM and LPARAM combination for this to work. I have also tried using SendMessage with the WM_COPY message but that didn't work for my needs.

Please if anyone has done this before successfully using SendMessage I would greatly appreciate your help.

© Stack Overflow or respective owner

Related posts about sendmessage

Related posts about c#