I use a temp file and a shell("print.bat") to send the temp.txt to printer. i hope to find another way to do it ..

If you are trying to print to the printer, why not use VB's built in printer object. Such as printer.print?

If you are trying to print to the printer, why not use VB's built in printer object. Such as printer.print?

because at my workplace the default printer in a network printer, and my application have to print to a local printer on LPT1, witch printer is only for printing barcode labels. and the string to print is a code witch is processed by the label printer.
the print.bat content is:

copy temp.txt lpt1

i found out something: the printer is not installed :S
i thought it was but i was wrong...
i'll try something and if it will be ok i'll post here

First things first, please read our posting rules. You have basically "hijacked" someone elses post AND this post is from 2006, ouch. Please start your own thread with the question above.

To your question, you will be making use of the MSComm Control, you will have to tap into your hardware's API's send with the hardware (hopefully), and then get the code to correspond. See the 2 links below with some sample vb6 codes.

http://www.rentron.com/PC_REMOTE.htm

OR

http://bytes.com/topic/visual-basic/answers/497752-help-usb-ir-receiver-transmitter

If you want to ask more question regarding this, as above, please start your own post.

This article has been dead for over six months. Start a new discussion instead.