Advertisement

06.27.2008 at 08:29PM PDT, ID: 23523447
[x]
Attachment Details

How to display non-printable ASCII characters in a message box

Asked by sasllc in Microsoft Visual Basic.Net, Visual Basic Programming

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?  TIAStart Free Trial
[+][-]06.27.2008 at 09:15PM PDT, ID: 21889231

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 09:19PM PDT, ID: 21889242

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 07:37AM PDT, ID: 21891039

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 08:06AM PDT, ID: 21891123

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, Visual Basic Programming
Sign Up Now!
Solution Provided By: FernandoSoto
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.29.2008 at 06:23AM PDT, ID: 21893888

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.29.2008 at 06:40AM PDT, ID: 21893932

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 07:33AM PDT, ID: 21925845

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2008 at 07:58AM PDT, ID: 21926085

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628