Use SendMessage in C# to perform a CTRL-C operation on a given handle
- by gtaborga
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.