Solved

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

Posted on 2004-10-11
10
478 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

809 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