Text formatting DOS commands
Thru my VB program I want to take out a DOS-mode print-out of a text that should contain text-formatting commands.But I am ignorant about these commands.Need info on these commands.
[181 byte] By [
softraj] at [2007-11-11 8:49:06]

# 1 Re: Text formatting DOS commands
What do you mean "text-formatting commands"? You mean colors and bold and such?
# 2 Re: Text formatting DOS commands
As above from edburdo, text-formatting commands? If you mean colours, bold, etc ... DOS printouts out are simple notepad like printouts. No text formatting, such as colours is possible in actual DOS, tho I'm unsure if it is with neo-DOS (ME, XP DOS shell)
Also provide a bit more information, such as why you want it done via DOS and if it's neccessary to be done through DOS :)
# 3 Re: Text formatting DOS commands
You can do the colors and such with API's. Just not natively in VB Classic.
VB 2005 will also let you do colors and things in the console (not sure about other formatting, but colors are possible).
# 4 Re: Text formatting DOS commands
I think he wants a character-mode printout (such as to a dot-matrix printer) and he's asking how to send formatting commands to the printer. Softraj, can you please be more specific?
# 5 Re: Text formatting DOS commands
If you want to do what Phil suggests you are trying to do, if you know the Esc codes, simply printer.print [ later edit : or store them in your ascii file] vbKeyEscape & "(whatever)", or are you asking what the actual codes are? Some are reasonably common (e.g. chr$(15) - compressed printing; chr$(18) - normal size if my memory is correct), but a google of 'dos printer codes' has a fair bit of information, including http://www.dsbglobal.com/dosprinter/help/index.html?shm_contents0008.htm
gupex at 2007-11-11 17:29:02 >

# 6 Re: Text formatting DOS commands
Phil Weber,you've guessed me right!The formatting I am referring are - indentation,bold,italic & underline.From what I know each of these formats can be represented in the main text using special key combos.The text is to be stored in a text file & then using Shell the DOS command "Type<filename> > PRN" is to be executed.Am I on the right track?
# 7 Re: Text formatting DOS commands
When you have the right 'info' in your text file, try 'COPY MyFile.Txt > PRN'
gupex at 2007-11-11 17:31:02 >

# 8 Re: Text formatting DOS commands
gupex,you've not answered my query.And,perhaps,you should remove ">" from the command 'COPY MyFile.Txt > PRN'.
# 9 Re: Text formatting DOS commands
"you've not answered my query."
As far as I can work out, your query was :-
"I want to take out a DOS-mode print-out of a text that should contain text-formatting commands.But I am ignorant about these commands.Need info on these commands."
Have you checked out the link I suggested in a previous post :-
http://www.dsbglobal.com/dosprinter/help/index.html?shm_contents0008.htm
As for "And,perhaps,you should remove ">" from the command 'COPY MyFile.Txt > PRN'." , you are certainly reaching back some years, but I am still of the opinion that either will work, although I seem to remember using '>' in such commands. In any event, I thought your problem was more about printer control codes (therefore I suggested the above link).
gupex at 2007-11-11 17:33:13 >

# 10 Re: Text formatting DOS commands
I'll inform you after checking out the strange looking printer codes stated in the link given by you.I doubt whether it'll work because these codes are related to an app called the DOS Printer & cannot be used independently.
# 11 Re: Text formatting DOS commands
Whatever ...
gupex at 2007-11-11 17:35:14 >

# 12 Re: Text formatting DOS commands
softraj:
- Let me reach back into the dim and distant past past of DOS to mention here that printer control codes embedded in a text file are (with a few exceptions) specific to the hardware printer you are using. What works for one printer will probably not work for another...
- When word processing was done in DOS, a LOT of the application code consisted of exactly those printer control codes so that the application could actually output to more than one brand/model of printer...
Sigid at 2007-11-11 17:36:12 >
