Sending CTRL key to a comm port?! 
Author Message
 Sending CTRL key to a comm port?!

Has anyone had to send a CTRL key combination to a comm port?  I need to send
CTRL-Z and can't for the life of me see how to do it.  I have spotted the
constants (VK_CONTROL) and tried using Chr$(VK_CONTROL)+"Z" but to no effect.

I have a horrible feeling this is going to be embarrassingly easy,once you know
it that is!

Any help appreciated

Regards
Paul



Fri, 05 Nov 1999 03:00:00 GMT  
 Sending CTRL key to a comm port?!

I suspect (just guessing) that you really don't need the control key itself,
just the correct ascii code for the combination. If so:

Ctrl-Z is Chr$(26)

I used the following line of code in the KeyPress event to find out:

Debug.Print KeyAscii

  >Has anyone had to send a CTRL key combination to a comm port?  I need to send

  >CTRL-Z and can't for the life of me see how to do it.  I have spotted the
  >constants (VK_CONTROL) and tried using Chr$(VK_CONTROL)+"Z" but to no effect.
  >
  >I have a horrible feeling this is going to be embarrassingly easy,once you
know
  >it that is!
  >
  >Any help appreciated
  >
  >Regards
  >Paul
  >



Fri, 05 Nov 1999 03:00:00 GMT  
 Sending CTRL key to a comm port?!

Have a look at the SendKeys Statement in the help file
you can send Contol with your key with that statement.
--
[Henri at]



: Has anyone had to send a CTRL key combination to a comm port?  I need to
send
: CTRL-Z and can't for the life of me see how to do it.  I have spotted the

: constants (VK_CONTROL) and tried using Chr$(VK_CONTROL)+"Z" but to no
effect.
:
: I have a horrible feeling this is going to be embarrassingly easy,once
you know
: it that is!
:
: Any help appreciated
:
: Regards
: Paul
:
:



Fri, 05 Nov 1999 03:00:00 GMT  
 Sending CTRL key to a comm port?!

Unless your looking at sending PC scan codes for some reason, you
should be able to just send a Chr$(26) which is the value of a CNTL-Z.


Quote:
>Has anyone had to send a CTRL key combination to a comm port?  I need to send
>CTRL-Z and can't for the life of me see how to do it.  I have spotted the
>constants (VK_CONTROL) and tried using Chr$(VK_CONTROL)+"Z" but to no effect.

>I have a horrible feeling this is going to be embarrassingly easy,once you know
>it that is!

>Any help appreciated

>Regards
>Paul



Tue, 16 Nov 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. how to Send the CTRL+SHIFT keys (no other key)

2. Block System Key like ALT+TAB, Ctrl+Alt+Del, Ctrl+Esc key

3. opening and sending BINARY to a comm port.

4. How send BYTES down comm port

5. How do i send a hex value to the comm port

6. Sending data to a comm port that is in use

7. Unable to send data on comm port

8. Send Ctrl-Z to Com Port using MSComm

9. sending CTRL+Z to the COM port!!?

10. Send Ctrl-Z to Com Port using MSComm

11. sending Ctrl+A keystroke to COM1 port

12. Sending Ctrl-Break to Serial port

 

 
Powered by phpBB® Forum Software