I use the vbclrf for enter but i need backspace code in vb6.0
There is no vbBackspace constant, but the ASCII value of backspace is 8, so you can use: "Chr(8)" to "display" a backspace (for example: strTest = "Hello" & Chr(8) ). You can see all the ASCII values and their corresponding characters here: http://www.asciitable.com/
CHR(8)
I've been trying to backspace a character in the console (i.e. delete the rightmost character).
for me, using a console.writeline(chr(8).tostring) by itself only moves the cursor left, and the rightmost character is still there.
I've used the following which has the effect I want:
Dim bs As String
bs = Chr(8).ToString & Chr(32).ToString & Chr(8).ToString ' bksp & sp & bksp
console.writeline(bs)
is there another more direct way to backspace a character? -- without using sendkeys?
Use the following method i used to use it;
SendKeys "ENTER"
here is the list of codes for other keys
'HERE IS A LIST OF KEYS
'Backspace {BS}
'Break {BREAK}
'Caps Lock {CAPSLOCK}
'DELETE {DEL}
'Down Arrow {DOWN}
'END {END}
'ENTER {ENTER} or ~
'Escape {ESC}
'Help {HELP}
'Home {HOME}
'Insert {INS}
'Left Arrow {LEFT}
'Num Lock {NUMLOCK}
'Page Down {PGDN}
'Page Up {PGUP}
'Print Screen {PRTSC}
'Right Arrow {RIGHT}
'Scroll Lock {SCROLLLOCK}
'Tab {TAB}
'Up arrow {UP}
'F1 - F16 {F1} - {F16}
'Shift +
'Ctrl ^
'Alt %
6,303 views
Usually answered in minutes!
×