Solved

how to get a dot-matrix printer as fast as it is in DOS

Posted on 2004-10-11
10
483 Views
Last Modified: 2010-03-13
Greetings all!
My installation has 5 Seikosha BP5870 printers which print very fast from my DOS programmes.
I have installed the printer and am printing the reports from my Windows VB app, but Windows insists on printing in graphics mode, printing each line twice or more - for perfect clarity  o:{

I have set the quality to draft , and tried adjusting the Dithering and Resolution, but all to no avail.

Is there any way to get the printer just printing text in the good, ol' fashioned way?

Regards
Tony
0
Comment
Question by:pitwood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 9

Expert Comment

by:Shahid Thaika
ID: 12280042
Is the program which is insisting on you choosing the best quality, you own vb app or someone else's. If someone else's, then he has probably written a poor app. If it is your vb app, you could try setting reference to 'Microsoft Common Dialog' controls and call the ShowPrinter function. Alternatively, you could just say...

Printer.PrintQuality = vbPRPQDraft or
Printer.PrintQuality = vbPRPQHigh or
Printer.PrintQuality = vbPRPQLow, etc...

Hope this answers your question
0
 
LVL 3

Expert Comment

by:Noel_Castillo
ID: 12283355
If you are using the printer object in vb. that is:
Printer.Print ........
....
....
Printer.EndDoc

then there should be no problem. try installing a generic text(make it default) instead of the actual printer driver. and you'll find your printer printing the old fashion way. (dont forget to set the font in the printer console ok? make it draft)


but if you're using a report writer like crystal report. we have the same problem and still seeking for an answer.
:)
0
 
LVL 7

Expert Comment

by:Enlade
ID: 12283451

Boy, I used to work for Seikosha Tech Support nearly 20 years ago.  Didn't think I would ever hear that name again after all these years.

I think that you discribed the problem correctly.  When windows prints to the Printer object it prints in graphics mode on those old dot matrix printers.  What you need is to write directly to the printer port (LPT1:) instead of using the Printer object.  However, I don't know if that is as easy as it used to be in VB.  I can probably find out for you, but probably someone else will be able to answer the question faster.  If not, then I'll look for something.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:Enlade
ID: 12283474

Maybe try something like this:

Open "LPT1" For Output as #1

Print #1, "Hello World!!!"

Close #1

0
 
LVL 7

Expert Comment

by:Enlade
ID: 12283483

I just realized that I can't test anything since I have an Network printer and nothing connected to my LPT (PRN) port.  So, all I can do is suggest stuff to try (like the above).  Sorry.

0
 
LVL 7

Expert Comment

by:Enlade
ID: 12283494

Also try "LPT1:" with the colen.  Sometimes it requires a colen to work.

So, try

Open "LPT1:" For Output As #1

.....

0
 
LVL 7

Expert Comment

by:Enlade
ID: 12283500

Oh, you know I could probably redirect LPT1 to my Network printer and test it that way.  Let me try that....hold up...
0
 
LVL 7

Accepted Solution

by:
Enlade earned 500 total points
ID: 12283549

Yea...that works.  You just need to use Open and Print.  If you want to use fonts or bold or italic or any other text format then you will need to use the printer control codes to set those on your printer.  For instance, if you want Elite type font you would look up the control code in the back of your Seikosha manual for Elite font (its something like 27, 69 though I don't remember so look it up).  Still, lets say it is 27, 69 so I can show you how to make use of that control code.  You would do something like this.

Open "LPT1:" For Output As #1

Print #1, Chr(27) & Chr(69) & "Hello World!!!!"

Close #1

Hope that helps; though, I might add that printing directly to the printer is not all that common an approuch to printing.  But if you have an old dot matrix printer then it is probably the solution you are looking for.
0
 

Author Comment

by:pitwood
ID: 12284765
Thanks, guys, for your speedy responses.

Enlade has given me the answer - the one I feared!  o:}

I will have to write a completely different section for my printing routines (lots of work!) to allow for the dot-matrix printers - basically just the same as I did in my old DOS Basic programmes.

I'll check it out and report back

Regards
Tony
0
 

Author Comment

by:pitwood
ID: 12363016
Muchos gracias, Eldane,

It works a dream

Regards
Tony
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question