Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 28th, 2004, 02:18 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default Dot Matrix Printer Using VB

Hi to All
i want to print any document suppose invoice of any party with the help of VB program on dot matrix printer in Character Mode not in Graphical Mode(GUI mode).
now, i m going to differenciate between character mode and graphical mode

Graphical Mode: Default printing on Dot-matrix printer via VB program is GUI Mode but i want to print it in character mode ( dotted character)

but i want to print in dotted format on dot matrix printer by Window programming Language ( Visual Basic)

How can be possible?

Pls. urent reply
 
Old June 28th, 2004, 09:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Using information here and in your other post (Post one complete message.. not two)..

I don't think you can.

Your using Crystal Reports- that means you have a layout that relies on graphical layout rules, rather than spaces and monospaced fonts (like you would have done in the "olden Days")



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 28th, 2004, 09:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Oh wait- that said - you CAN print graphics to a dot matrix printer.... it's just slower.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 28th, 2004, 10:48 AM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You want to get direct control of printer thru VB?. I do not know of a way to control lpt1: directly in VB. You may try the following code which is from the good ol' DOS/QBasic days.

Open "LPT1:" for output as #1
Print #1, chr(65)
Print #1, chr(12)

which would just print "A" followed by a form feed on your printer.

You did mention it's urgent. If the above doesn't work, see if you can get a serial printer or a serial to parallel interface. Then all you need to do is open a com port which VB does allow you to have direct control. Yes you can print graphic file in your own formating this way.

3rd way is for you to write your own device driver. But since you need to drive the "lpt" port not the printer itself I do not know if this is even possible.

Lastly if all you needed to do was print an invoice or fill in the blanks on any pre-printed form, don't see why crystal reports can't help you.

 
Old April 18th, 2005, 06:54 AM
Registered User
 
Join Date: Apr 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,

Make sure that you have a dotmatrix printer installed on your system.
This will provide you with a list of fonts like "Draft 10CPI", "Draft 8CPI" and so on...
Select appropraite draft font for your field in report.
I hope it will help you

Zaheer

 
Old April 17th, 2007, 08:03 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have the same problem. even if I use a Draft font printer. it look well in view mode in Crystal report designer, but it dosn't take effect in crystal report form viewer.
any help will be appreciate, thinks

 
Old May 9th, 2007, 09:00 AM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by sabsait
 Hi to All
i want to print any document suppose invoice of any party with the help of VB program on dot matrix printer in Character Mode not in Graphical Mode(GUI mode).
now, i m going to differenciate between character mode and graphical mode

Graphical Mode: Default printing on Dot-matrix printer via VB program is GUI Mode but i want to print it in character mode ( dotted character)

but i want to print in dotted format on dot matrix printer by Window programming Language ( Visual Basic)

How can be possible?

Pls. urent reply








Similar Threads
Thread Thread Starter Forum Replies Last Post
Print data report in dot matrix printer in VB p_rajaprabu Crystal Reports 1 April 20th, 2011 02:16 PM
Printing Report on Dot Matrix Printer ashu_from_india Crystal Reports 27 April 20th, 2011 12:56 PM
printing on dot matrix printer Y.kamal Crystal Reports 1 March 5th, 2007 04:19 AM
Printing on dot matrix printer using C# fgoldenstein C# 2005 2 September 14th, 2006 01:26 AM
Printing problem dot matrix printer using VB.Net [email protected] Crystal Reports 0 February 21st, 2006 11:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.