Printing ASC characters

I am trying to print some asc characters (box drawing shapes - codes 179 thru 223). If I use open "lpt1:" for output and print#1, (asciicode), I get the desired characters. I want to use the printer.print statement though. When I do this, I get a different set of characters for codes 128 thru 255. How can I use the printer.print statement to do this? I do not understand what is going on with the caharacter sets.  
dmoore2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mark2150Commented:
You simply do NOT draw this way in VB. This was a tried and true technique in QBASIC and DOS, but simply is NOT going to work in VB.

You can draw a box with:

Printer.Scale (0,0)-(8,10.5) '8-1/2x11 w 1/4" margins all round
Printer.Line (0,0)-(1,1), vbBlack, B

You set the .Scale property of your printer to the size of your page less a little bit for margin and then you can treat the printer like a plotter.

Position with .CurrentX/Y and use Printer.Print to put text down at that exact point (The text always prints down an to the right from the point specified).

For instance I can make graph paper with 1/4" grid with:

Printer.Scale (0,0)-(8,10.5) '8-1/2x11 w 1/4" margins all round

For X = 0 to 8 step .25
  Printer.Line (X, 0)-(X, 10.5) 'Draw verticals
Next X
'
For Y = 0 to 10.5 step .25
  Printer.Line (0, Y)-(8, Y) 'Draw horizontals
Next Y
'
Printer.EndDoc

Do not bother with "box drawing" characters. They won't lay out right with proportional fonts anyway.

M
0
dmoore2Author Commented:
Can the box be drawn first with with the text plotting code following?
0
mark2150Commented:
You can do it in any order you want. You can move up the page as well as down. Normally I print the outlines of the form and then come back in and overlay the data, but that's just me. You can print in any order you want.

M
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Fonts Typography

From novice to tech pro — start learning today.