CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 1999
    Location
    Kent, England
    Posts
    2

    Printing to dot matrix printers

    Hello all,

    I need to print to a dot matrix printer on a line-by-line basis. In the DOS days I would use the LPRINT command and I would be happy. But using Visual Basic (v6) I can only currently print whole pages when using the Printer object.

    Any suggestions,


    Matthew Knott.



  2. #2
    Join Date
    Aug 1999
    Location
    France
    Posts
    39

    Re: Printing to dot matrix printers

    try to use:

    printer.print "some text"
    printer.endDoc





  3. #3
    Join Date
    Sep 1999
    Location
    Kent, England
    Posts
    2

    Re: Printing to dot matrix printers


    Thanks but this (on my printer) results in the text being printed and then a form feed automatically sent to the printer when the EndDoc method is called.

    What my aim is to print one line then later print another line (minus the form feed).

    Any ideas?


    Matthew Knott



  4. #4
    Join Date
    Aug 1999
    Location
    France
    Posts
    39

    Re: Printing to dot matrix printers

    Sorry but I thinks that isn't possible with VB

    perhaps you can do this with the papersize property ???


  5. #5
    Join Date
    Aug 2000
    Posts
    3

    Re: Printing to dot matrix printers

    printer.print "Some text for line 1"
    printer.print "Some text for line 2"
    etc...........
    printer.enddoc



  6. #6
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Printing to dot matrix printers

    sCommandString = NETWORKPRINT & " " & sTextFile & " q=" & sQ & " s=" & sServerString
    r = Shell("start.exe " & sCommandString, vbHide)

    where NETWORKPRINT -> path to the novell command nprint (for example f:\public\nprint)
    sTextFile -> your file to print
    sQ - printer queue
    sServerString - server name

    Shell command will call nprint which will send to dot matrix printer

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  7. #7
    Join Date
    Mar 2000
    Posts
    145

    Re: Printing to dot matrix printers


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