:eek: My Dad has been working on a program and since he isn't online, he is having me ask you all for HELP !!!!!
How do you access the USB printer driver included in Windows and be able to use that information to print application programs using QuickBasic 4.0 ?

Recommended Answers

All 11 Replies

i dont think quickbasic can

*switch to VB!*

or a better language like C, C++, or Java.

*switch to VB!*

or a better language like C, C++, or Java.

Humm, not very helpfull...

If he is just trying to print to a USB printer then he can use the NET USE Command from the DOS prompt like this:

:>net use lpt1 \\ [Server]\[Shared Printer]\ /persistent:y

OR

He can use a third party program like DOSPrint from
www.andtechnologies.com/dosprint.html

that assumes the printer is actually assigned to a DOS accessible printer port rather than a network URI (which is quite possible with USB printers).

Wait do you mean like "lprint "W/e"

Specifically what command within a QB4.5 basic program with send output to a printer rather than the DOS screen when running a compiled QB program within XP. Obviously "LPRINT" does not do it.

Specifically what command within a QB4.5 basic program with send output to a printer rather than the DOS screen when running a compiled QB program within XP. Obviously "LPRINT" does not do it.

LPRINT does work, but there is very long pause becuase the LPRINT command does not use the CLOSE Command. This started with the WinNT. Without it, the windows spooler will pause for ~90 secs before it prints anything out, or will wait until the next output command... Try something like this first, and be sure to be useing either the NET USE command to virtually route the port, or use a free third party app like DOSPRINT to route the port to a USB. I have over 500 customers "still" using with these methods.

File$ = "LPT1:"
d% = FREEFILE
OPEN File$ FOR OUTPUT AS #d%   'Open Device

	PRINT #d%, TAB(5); "Printed stuff goes here"
	PRINT #d%, CHR$(12) 

Close #d%

Do not forget to use the form feed, CHR$(12) !!! Printing starts as soon as the close command is received, if you do not, then there can also be a pause depending on the type of printer you are useing, ie Dotmatrix...

Alright, this thread is more than a year old.

:eek: My Dad has been working on a program and since he isn't online, he is having me ask you all for HELP !!!!!
How do you access the USB printer driver included in Windows and be able to use that information to print application programs using QuickBasic 4.0 ?

Try http://www.brothersoft.com/downloads/dosprint.html

It works for me for an old gwbasic program to print to usb. Jack

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.