Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I send a Ctrl-C character? 2

Status
Not open for further replies.

CraigBest

Programmer
Aug 1, 2001
545
US
I have an application using a Telnet control that I need to send a Ctrl-C character. I was thinking I could use a Chr$(X) where X is the ASCII value of a Ctrl-C, but I don't know what that value is, and can't find it in any of my books. Can anyone help me out? Or is there a better way to do this?
 
Sorry, that should have read Ctrl-Z, not Ctrl-C. But I'd gladly take answers to both!

Craig in NJ
 
The full ASCII table is here:

Control characters are 64 less than the normal uppercase character. So 'Z' is 90, CTRL-Z is 26 and so on.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Type this: very simple solution

SendKeys "^C"

the ^ simulaties Ctrl key being pressed.

I use this for all my copy menu needs :)
 
Thanks guys I really appreiciate it. Good to know both methods.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top