Q

How do you send (SendKeys) a numeric pad Enter (KeyState= 00000100) key versus a standard Enter key

This Content Component encountered an error
How do you send (SendKeys) a numeric pad Enter (KeyState= 00000100) key versus a standard Enter key (KeyState= 00000000)? Both are KeyCod 13. The Enter key and Line Feed keys work fine but the program requires a Numeric Pad Enter key to function correctly.
Instead of messing with the basically broken SendKeys function, you'll definitely want to take a look at the SendInput function. With SendInput, you'll have much more control over life and can properly force in any sort of input you want. I even wrote a relatively complete UI testing utility called Tester a few years ago ( http://msdn.microsoft.com/msdnmag/issues/02/03/bugslayer/) that shows how to use it. It's a C++ application, but you'll get the idea.
This was first published in January 2004

Dig deeper on .NET tutorials, guides and quizzes

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close