SendKeys Subtract

  • Thread starter Thread starter Chris Oswald
  • Start date Start date
C

Chris Oswald

I've posted this before and haven't gotten an answer. I am trying to
get a hyphen, minus, subtract, whatever you want to call it, to show up
with sendkeys. I have tried the OpenNetCF 1.4 class and that key
doesn't seem to work. Anyone have any ideas?
 
What control has the focus when you do this? I don't have any managed code
that does this, but I just verified that PostKeybdMessage() will do it
correctly for minus.

Paul T.
 
Paul,

The textbox has the focus when I do this. I am using the keybd_event
to send the key. Apparently I shouldn't be doing that. I used the
PostKeybdMessage and sure enough it worked! Thanks Paul!

I guess I should stick to the PostKeybdMessage for just sending text
that doesn't need special keys.


What
 
Don't use keybd_event to send printable characters, yes. You need to use
keybd_event() to send things like VK_ENTER, VK_UP, VK_DOWN, etc.
PostKeybdMessage() is better for the printables.

Paul T.
 
Back
Top