The following program will try to set your USB printer up for LPRINT. First you must Share the Printer in a Network. Goto Control Panel and select the USB printer to use and R Click Properties. On the Share Tab just click share and Windows will create a Printer Share Name.
Then Click the Advanced Tab and click the Print Processor button. A Window will come up telling you the present setting. If it is NOT Text then change it to Text. Remember your old setting!
Then run the following Qbasic routine. It uses the NET VIEW and NET USE command options to allow data sent to LPT1 by LPRINT to be routed to the USB printer:
COLOR 11: LOCATE 2, 20: PRINT "XP USB Printer to assign for LPRINT"
COLOR 10: LOCATE 3, 4: PRINT "In Control Panel, set the USB printer to Share with Text Format (not RAW)."
Computer$ = ENVIRON$("COMPUTERNAME")
SHELL "NET VIEW " + Computer$
COLOR 14: INPUT " Enter the USB Printer's Share Name from above: ", Printer$
SHELL "NET USE LPT1 \\" + Computer$ + "\" + Printer$ 'transfer from LPT1 to USB
LPRINT "Test of USB Printer use with LPRINT." + CHR$(10) 'line feed
LPRINT CHR$(12) 'form feed
SYSTEM 'end of routine
'NOTE! You only have to run this once! You may have to reset the Print Processor Text setting for other Windows uses.
To CANCEL the settings use the code below with the variables from above:
SHELL "NET USE LPT1 \\" + Computer$ + "\" + Printer$ + " /Delete"
This XP hint was contributed by QBGuy in the main Forum.
|This message has been edited by burger2227 on Dec 5, 2009 5:30 PM|
This message has been edited by burger2227 on Jan 5, 2009 7:54 PM
This message has been edited by burger2227 on Jan 5, 2009 7:52 PM
This message has been edited by burger2227 on Jan 5, 2009 7:51 PM
This message has been edited by burger2227 on Jan 5, 2009 7:47 PM
This message has been edited by burger2227 on Sep 14, 2008 11:54 AM