Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 28th, 2004, 02:18 AM
Registered User
 
Join Date: Jun 2004
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old June 28th, 2004, 09:39 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
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
Reply With Quote
  #3 (permalink)  
Old June 28th, 2004, 09:40 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
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
Reply With Quote
  #4 (permalink)  
Old June 28th, 2004, 10:48 AM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Location: , , .
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.

Reply With Quote
  #5 (permalink)  
Old April 18th, 2005, 06:54 AM
Registered User
 
Join Date: Apr 2005
Location: Hyderabad, AP, India.
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

Reply With Quote
  #6 (permalink)  
Old April 17th, 2007, 08:03 AM
Registered User
 
Join Date: Apr 2007
Location: , , .
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

Reply With Quote
  #7 (permalink)  
Old May 9th, 2007, 09:00 AM
Registered User
 
Join Date: May 2007
Location: Hoshiarpu, Punjab, India.
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



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03: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 sukhsinghin@yahoo.com Crystal Reports 0 February 21st, 2006 10:29 AM



All times are GMT -4. The time now is 05:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.