Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » General

Post new topic   Reply to topic
Display ASCII characters (128 to 255) in a text/richtext con
View previous topic :: View next topic  
Author Message
JerrySykes
Newbie


Joined: 26 Feb 2006
Posts: 2
Location: Israel

PostPosted: Feb 26th, 2006 06:58 AM    Post subject: Display ASCII characters (128 to 255) in a text/richtext con Reply with quote

Biggrin My project is a simple terminal VB6 program (based on the sample VBTerm).

I am using a RichTextBox to display received characters from a COM port.
The problem is with characters in the range 128 to 255.
They are not displayed as I'd expect.
I want these characters to be in codepage 437 (i.e. box drawing and block characters).
I have tried using Terminal and Arial Unicode MS fonts, I have even tried playing with
the \ansicpg control word, \'xx and \uN special characters.

I am competely lost !!
Any help would be most appreciated.

Thanks, VB newbie[/b]
Back to top
View user's profile Send private message Visit poster's website
RoofRabbit
Regular


Joined: 06 Jul 2005
Posts: 95
Location: Lenoir, NC USA

PostPosted: Feb 26th, 2006 11:48 PM    Post subject: Reply with quote

Make sure your serial connection is for 8 bits and not 7 bits. The 7 bit connections won't give you anything above 127.
_________________
Website - [link]
Back to top
View user's profile Send private message Visit poster's website ICQ Number
JerrySykes
Newbie


Joined: 26 Feb 2006
Posts: 2
Location: Israel

PostPosted: Feb 27th, 2006 07:40 AM    Post subject: Reply with quote

I am using the RichTextBox so I can use a different font color for received text.
I also want to use the Terminal font.
The problem is the Terminal font is an OEM font and has no Unicode code points.
I think I'm fighting a loosing battle with this one.

Question: If I use a Unicode monospaced font like Lucida Console then all
I have to do is convert the bytes received into Unicode and let VB do the rest?

How can I do this conversion?

Incidently, if I change
\fcharset255 Terminal
in the RTF font table to
\fcharset254 Terminal
then I can see the chars 128 to 255 but in the Arial font
and not the Terminal font.

All this RTF header stuff is a nightmare.

Please help
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic