Solved

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

Posted on 2004-10-11
10
476 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
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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now