954,124 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

HELPPPPPPPP, Need to know about Windows XP and QuickBasic USB printer driver access

: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 ?

Softhearted1
Newbie Poster
1 post since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

i dont think quickbasic can

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

*switch to VB!*

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

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 
*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

qb45Mike
Newbie Poster
5 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

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).

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

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.

TedS
Newbie Poster
1 post since Mar 2008
Reputation Points: 10
Solved Threads: 0
 
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...

qb45Mike
Newbie Poster
5 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 

These articles explains either how to speed up printing from DOS to Windows printers (without changes to the Basic source) or how to let Basic programs printing to GDI Windows printers .

Regards,
Davide Guolo
aSwIt s.r.l.

printfil
Newbie Poster
5 posts since Mar 2008
Reputation Points: 10
Solved Threads: 1
 

Alright, this thread is more than a year old.

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 
: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

Jackgrt
Newbie Poster
9 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 
Jackgrt
Newbie Poster
9 posts since Jun 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You