Results 1 to 10 of 10

Thread: findin network printer in dos printing

  1. #1

    Thread Starter
    Lively Member afterMoon's Avatar
    Join Date
    Oct 2002
    Location
    cochin
    Posts
    117

    findin network printer in dos printing

    Hi all

    How can I print thro' a network printer, If I'm using dos printing.

    eg:-
    open 'LPT1' for print (Not sure ab't the sysntax)
    print# "Hello World"

    what change should I make for that?

    please help
    when in doubt, win the trick

  2. #2

    Thread Starter
    Lively Member afterMoon's Avatar
    Join Date
    Oct 2002
    Location
    cochin
    Posts
    117
    I mean

    open 'LPT1' for output as #1
    print#
    when in doubt, win the trick

  3. #3
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    I'm confused.

    Are you writing a vb program, or are you opening up a program written in dos and trying to print, or are you trying to do something from the command prompt.

    please specify.
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

  4. #4

    Thread Starter
    Lively Member afterMoon's Avatar
    Join Date
    Oct 2002
    Location
    cochin
    Posts
    117
    of course I'm writing a vb program.
    I just wanted to print a bill.
    It was working fine when it is connected to a local printer.
    But it goes hanging when try to print in a networkprinter.

    thanks for your response Dalceon
    when in doubt, win the trick

  5. #5
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    post some code, or give me more info on the line for which it is hanging up on.

    In theory printing to a network printer shouldn't be any different from a local printer.

    are you using hte printer object??
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

  6. #6

    Thread Starter
    Lively Member afterMoon's Avatar
    Join Date
    Oct 2002
    Location
    cochin
    Posts
    117
    But I'm using the code

    open 'LPT1' for output as #1
    So I think the system trying to open Local printer port.
    may be I should change LPT1 to something else
    when in doubt, win the trick

  7. #7
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    use the printer object instead.

    printer.print #
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

  8. #8

    Thread Starter
    Lively Member afterMoon's Avatar
    Join Date
    Oct 2002
    Location
    cochin
    Posts
    117
    means no way while using 'open' method?
    please help, because I already wrote the code
    please
    when in doubt, win the trick

  9. #9
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    In theory there is a way.
    You can redirect lpt1 to a network printer.

    if you use shell and do:

    net use lpt1 \\someserver\someprinter

    then anyprinter that is setup to use lpt1 will print to the network printer instead.

    I'm not sure how it would work in your situation.
    I would try the redirection, then use your code and see what happens.
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

  10. #10

    Thread Starter
    Lively Member afterMoon's Avatar
    Join Date
    Oct 2002
    Location
    cochin
    Posts
    117
    thanks Dalceon,
    It works fine while using the network path. I just iterated the device names of 'Printer' object and used it.

    thanks again
    when in doubt, win the trick

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