Q

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

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 last 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.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close