express ASCII charactor ESC in a string?

W

wang xin

I want to send PCL command to my printer. But I do not know how to express
ASCII charactor ESC in my command string.

Any suggestion? Thanks!
 
A

Alex Feinman [MVP]

C#: \x1b
VB: Chr(27)

string sCmd = "\x1bP"; // ESC+P
Dim sCmd as String = Chr(27) + "P" ' Esc+P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top