Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody,

Can anyone tell me that how I can print a document to a USB Printer from DOS through VB.Net?

Now I am working on a project for a grocery shop application. I want to print a bill through Lipi LTP 200 model printer but the problem is that this printer has a USB port.

I can print the bill via LTP1 port but it is not possible in USB port printers.

If anyone know how to do this then please help.

Regards
Subrat,
From India
:cool::cool:
Posted
Updated 4-Dec-10 22:54pm
v3
Comments
Dave Kreskowiak 4-Dec-10 10:55am    
Would you mind explaining why this has to be from DOS?? Who on Earth write a DOS app in the day and age?
Subrat Kumar Rautara 6-Dec-10 3:02am    
But this not a permanent solution.
Is there any solution................
Please tell me.....

I have used this utility before look at http://www.dos2usb.com/index.htm

I have had mixed results - i.e works most of the time in XP - not tried this on Vista or 7

Net Use LPT1 \\ComputerName\Printer_Name /Persistent:Yes

I believe the printer has to be shared

or something I have not tried is vbscript :-

WshNetwork.AddPrinterConnection

other than these I cannot think of anything else - sorry :(
 
Share this answer
 
v2
Comments
Dalek Dave 6-Dec-10 4:56am    
Good Call.
Use a RAW[^] printer instead. You will be able to print directly from your application.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900