views:

104

answers:

1

I am trying to send a ctrl-x keystroke to COM2 and I ahve to code to open the port and read and write but when I tried to send Chr(Keys.ControlKey + Keys.X) it did not work. any ideas?

+2  A: 

If this is interactive, the event that passes KeyChar will already pass a Char type that will be the CONTROL-X.

If your trying to generate the value, then Control-X is really just what letter is X in the alphabet. Its the 24th letter, and in ASCII that would just be 24 or 0x18.

So maybe you want a constant for it that would just be Chr(24).

Digicoder
So how would i send both, for example, hold control and hit X
Sean P
by the way sending the Chr(24) did not work. :(
Sean P
Can we see some code, it may help.
Digicoder