Hello all,
I am trying to get my program to emulate keyboard strokes and send to other programs. Currently I am using:
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int SendMessage(int hWnd, int msg, int wParam, IntPtr lParam);
and this is proving to be a headache. The way I implemented it, it works fine. I can send keystrokes to almost any program but Notepad (dont know why that wont work but I am guessing it is because there is the "Edit" subwindow inside it).
Anyways, people using the software cant figure out the title/class required. So I want to make a global keyboard presser basically. Something that programs with hotkeys can capture and also any program.
Is the basic SendKey function all that is needed? Will this trigger global hotkeys in other programs too? (I want this to happen, not prevent it!)
Is there a way to emulate an actual keyboard somehow? Maybe actually register a virtual keyboard?! I am just thowing out ideas here.
Thanks in advance!
Loading
sandeep kalraPosted Oct 14, 2008, 6:15 AM
Hi can you send me the code of SendMessage function. I facing a challenge to give WM_KEYDOWN and WM_KEYUP event for F1 key on other application using SendMessage function.Please mail me on
[email protected]
Thanks
sandeep kalraPosted Oct 14, 2008, 6:15 AM
Hi can you send me the code of SendMessage function. I facing a challenge to give WM_KEYDOWN and WM_KEYUP event for F1 key on other application using SendMessage function.Please mail me on
[email protected]
Thanks
Cory BorrowPosted Jul 2, 2008, 12:11 PM
http://msdn.microsoft.com/en-us/library/ms646310(VS.85).aspx
Nick NicholsPosted Jun 25, 2008, 8:32 PM