Sending CTRL-B as string

mswat

New member
Joined
Apr 5, 2006
Messages
2
Programming Experience
Beginner
When you use Hyperterminal, you can press CTRL-B out as a command on a serial device. I want to have a string variable do the same:

i.e. Dim OutMsg1 As String = "HELLO" (add CTRL-B command here)

How do i achieve adding the command CTRL-B to the end of the string above so that it would mirror the way Hyperterminal sends it out.
 
If you're using SendKeys class ctrl-b is spelled: ^b
Else I read somewhere that ctrl-b in Hyperterminal is sending ascii character 02, which in code is: Chr(2)
See what you can make of it..
 
DavidT_macktool said:
Dim OutMsg1 As String = "HELLO" + Chr(2)

Ctrl + A =
Chr(1)
Ctrl + Z = Chr(26)
and all the letters in between

Thanks to both replies above - really appreciate the help. This works.
 
Back
Top