CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: VB Printer

  1. #1
    Join Date
    Sep 1999
    Posts
    9

    VB Printer

    When I use the following algorithm to print a text file on the default printer (n/w or Local ), on some of the models of HP lasterjet some lines are getting missed out. But in some models printout are perfectly OK . Some models ejects blank pages too.
    Why is it like this ? Will it improve if I set all properties for the printer object ?

    I am using VB 4.0 32 bit Enterprise Edition

    **CODE SEGMENT **********
    [vbcode]
    Open "results.txt" for Input as #12
    Set Printer = Printers(0)
    while not EOF(12)
    Line Input #12, Buffer
    Printer.Print Buffer
    Wend
    close (12)
    Printer.NewPage ' release the document
    Printer.EndDoc




  2. #2
    Join Date
    Sep 1999
    Location
    Germany
    Posts
    66

    Re: VB Printer

    Try it:

    Open "results.txt" for Input as #12

    While Not EOF(12)
    Line Input #12, Buffer
    Printer.Print Buffer
    Wend
    Close
    Printer.EndDoc

    [email protected]
    http://vbcode.webhostme.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured