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 July 3rd, 2004, 09:54 AM
Registered User
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to syed rose Send a message via Yahoo to syed rose
Default alignment of text on dot matrix using vb...urgent

Hi,
   How can i align multi text on dot matrix printer at my prefered location of page.For example..i want to print address which is a multitext,
                          mr.john rodrigues,
                          caterpillar street,
                          london.
   LIke this at my prefered position.But ofcourse using Visual basic6.0 ,i mean using printer object.
        I really appreciate if anyone can help me in this.
regards,
rose.




 
Old July 8th, 2004, 06:45 AM
Authorized User
 
Join Date: Jun 2004
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Rose,

I have never used printer object if I am using dot matrix printer.
My common practice is,

First Select a reference from Project > References and select Microsoft Scripting At Runtime
This is the reference of FileSystemObject.
I used to write a text file using filesystemobject save it on a particular location.
While writing text file you can align text by using columns and rows
Write a batch file using same system object where in you will write command to print this file
        youFileNameWithFullPath.txt > Prn

save the file using extention ".Bat" rather than ".txt"

Once you are done with it

run the batch file using shell command i.e.
Shell "c:\yourbatchfile.bat"

that's it

printer starts printing

you just have to ensure whether you printer is configured to print from dos prompt

you can specify it by going in to "Start > Settings > Printers > Default Printer > Properties" Click on Spool Setting and check the option for dos prompt"



Vinod Pawar
Software Developer
India





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
Dot Matrix Printer Using VB sabsait VB How-To 6 May 9th, 2007 09:00 AM
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 sukhsinghin@yahoo.com 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.