|
-
Sep 17th, 2003, 01:50 PM
#1
Thread Starter
Lively Member
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
-
Sep 17th, 2003, 01:58 PM
#2
Thread Starter
Lively Member
I mean
open 'LPT1' for output as #1
print#
when in doubt, win the trick
-
Sep 17th, 2003, 02:02 PM
#3
Fanatic Member
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.
-
Sep 17th, 2003, 02:07 PM
#4
Thread Starter
Lively Member
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
-
Sep 17th, 2003, 02:10 PM
#5
Fanatic Member
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.
-
Sep 17th, 2003, 02:15 PM
#6
Thread Starter
Lively Member
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
-
Sep 17th, 2003, 02:32 PM
#7
Fanatic Member
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.
-
Sep 20th, 2003, 11:48 AM
#8
Thread Starter
Lively Member
means no way while using 'open' method?
please help, because I already wrote the code
please
when in doubt, win the trick
-
Sep 20th, 2003, 08:45 PM
#9
Fanatic Member
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.
-
Sep 22nd, 2003, 01:43 PM
#10
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|