Hex code in a text file

  • Thread starter Thread starter Brad Sanders
  • Start date Start date
B

Brad Sanders

Hello All,

I need a little help with a subject I am not very familier
with. I need to place into a text file several HEX codes
(0D 0C 0A). If I place these codes into the file with a
hex editor then when you open it with notepad the codes
show up as boxes (unknown ascii). That is exactly what I
need to do from vb.net. How to I write hex codes into my
text file?

Thanks
Brad
 
Hi,

0D is a Carriage Return, 0F is a Line Feed charater. When these are
adjacent (0D0F), this forms a "new line" character-pair -- equivalent to the
Enter key -- these, then will result in a new line in a textbox or other
window that acts similarly. However, they must be adjacent, or the result
will be the "little square boxes" because alone they are not printable or
displayable characters.

The 0C character is a Form Feed character. It causes a printer to advance
to the next page. When seen by an editing program (such as Word) it often
will cause a page-break. However it is not a displayable character in a
textbox (which has no page-break capability), so it will be displayed as a
"little square box" there. Notepad is not a full-blown editor, and it
doesn't have the concept of "pages."

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.
 
0D is a Carriage Return, 0F is a Line Feed charater.

The 0C character is a Form Feed character.

Armin is correct, 0D is Carriage Return, 0A is Line feed.
 
Back
Top