If it's possible to do, I need to know how to show the ascii values characters in a message box--or at least the non-printable ones. My Visual Studio 2005 app--running on a portable barcode scanner device--receives weight data from a digital scale; an example might be these six bytes: 123<sp><cr><lf>. During testing I need to be able to show on the scanner's screen the values that just came in to the serial port. Using a normal messagebox.show, I can show the string it's stored in, but I get "123 " followed by weird graphics characters where the cr and lf would be.
What would be far better would be a way for me to see "13" on the screen where the <cr> is in the string, and "10" where the <lf> is. And, I guess for consistency, I'd want to show ALL the characters as two-position ascii codes. So, in this example, I'm thinking that "123 <cr><lf>" would translate to "495051321310". Is there an easy way to do this? TIA
Start Free Trial