Printing in three different Printers Using VB 6.0

vba Mexico
  • 15 years ago

    Hi, I'm new in this forum, the reason I entered here is that i'm looking for some code in Visual Basic 6.0, that can help me to print in three different printers three different Reports.


    I mean i have to print Receipts of my sales in a EPSON TM-U220PB printer and the receipt must cointain the information of the sale (date, hour, seller, etc) directly to this printer, second the information of the product must be printed in another printer an EPSON LX-300+, and the third printer is used to print Report using a Samsung SCX-4x16 printer.


    I'm using the Data Report of Visual Basic to perform this Reports, the Report 1 and 2 (receipts and info of the product must be printed one after the other just after click on "OK") and the third Report is only used when i perform the reports (about Personal Information).


    I must select the printer obtaining the name of the printer for example:
    MyReceiptPrinter = EPSON TM-U220PB
    MyInfoProductPrinter = EPSON LX-300+
    MyReportsPrinter = Samsung SCX-4x16


    This must be saved in a .ini file (and i don't have the code to save this file 'DTMS.ini' and read the information again when the programm is started) so that each time the Programm is executed the programm itself read this information, if one printer is erased or deleted the programm must prompt to select another printer (in fact the printers are never deleted) but if the user want to Select another printer must be prompted to select the printers.


    The programm must show no Dialog Box to select the Printer because these printers are already selected since the begining, and the Data Report is not shown before printing only the third type of Report (Personal Reports) because is printed on the Samsung SCX-4x16 and it can be printed also on another printer for example a Color printer, but in fact if the Option "Show Report Before Printing" is selected or not,  the program can shows the Dialog Box or not to select the Printer.



    The structure of the DTMS.ini file must be


    [Printers]
    MyReceiptPrinter = EPSON TM-U220PB
    MyInfoProductPrinter = EPSON LX-300+
    MyReportsPrinter = Samsung SCX-4x16


    [Positions]
    X = 0
    Y = 0


    [Colors]
    Background = LightBlue
    Labels = Black


    [MenuStyle]
    Style = Office2003


    ...
    ...
    ...
    ETC


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”