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
2010-03-11 19:13:48
So how would i send both, for example, hold control and hit X
Sean P
2010-03-12 00:27:25
by the way sending the Chr(24) did not work. :(
Sean P
2010-03-12 01:14:14
Can we see some code, it may help.
Digicoder
2010-03-12 01:56:55