print to USB from Qbasic

Reply

Join Date: Apr 2005
Posts: 2
Reputation: paul2594 is an unknown quantity at this point 
Solved Threads: 0
paul2594 paul2594 is offline Offline
Newbie Poster

print to USB from Qbasic

 
0
  #1
Apr 27th, 2005
I recently updated my system to XP-2 with a pentium III. I have a number of qbasic programs I developed to use in my hobbies and lo and behold, I can't print to my usb port. The programs run okay. I should think this is a problem that has been solved many times but I haven't run acrossed the answer. Perhaps print-to-file then open and print the file with notepad or something. Any ideas?

Thanks, Paul
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,941
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 911
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: print to USB from Qbasic

 
0
  #2
May 6th, 2005
You might take a look at
USB Central
http://www.lvr.com/usb.htm

USBs like to use drivers.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 2
Reputation: paul2594 is an unknown quantity at this point 
Solved Threads: 0
paul2594 paul2594 is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #3
May 7th, 2005
Thanks! i check it out but i think i found a solution and it was as i suspected with a little wrinkle thrown in that makes it easier. 1st - create a text file the with the SHELL command you can open wordpad with a /p and the file name and wordpad will open the file and send it to the default windows printer. i haven't developed the code yet so wish me luck.

Thanks for you help. paul
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 5
Reputation: printfil is an unknown quantity at this point 
Solved Threads: 1
printfil printfil is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #4
Mar 22nd, 2008
Dear Paul,
this article might help: How to print from BASIC DOS to any Windows printer
Regards,
Davide
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 917
Reputation: linux is an unknown quantity at this point 
Solved Threads: 27
linux's Avatar
linux linux is offline Offline
Posting Shark

Re: print to USB from Qbasic

 
0
  #5
Mar 23rd, 2008
You can use LPRINT , can't you?
Toshiba M1151.49 GB DDR-2 RAM1.6 GHz Centrino Duo80GB HDDWindows XP Media Center Edition
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 5
Reputation: printfil is an unknown quantity at this point 
Solved Threads: 1
printfil printfil is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #6
Mar 24th, 2008
Originally Posted by linux View Post
You can use LPRINT , can't you?
LPRINT is hardcoded to LPT1: (only) and doesn't offer a way to close the LPT port at the print job end, causing long delays in newer Windows systems. Changing "LPRINT" with "PRINT #" as explained in the article above is easy with a good text editor and solves both those problems.
Regards,
Davide
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 2
Reputation: RWGBob is an unknown quantity at this point 
Solved Threads: 0
RWGBob RWGBob is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #7
Jun 7th, 2008
Originally Posted by paul2594 View Post
Thanks! i check it out but i think i found a solution and it was as i suspected with a little wrinkle thrown in that makes it easier. 1st - create a text file the with the SHELL command you can open wordpad with a /p and the file name and wordpad will open the file and send it to the default windows printer. i haven't developed the code yet so wish me luck.

Thanks for you help. paul
OPEN "O",1,"PRINT.TMP"
PRINT #1, "Just testing the code."
CLOSE 1
SHELL "C:\PATH\WORDPAD.EXE"

That's all there is to it.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 2
Reputation: RWGBob is an unknown quantity at this point 
Solved Threads: 0
RWGBob RWGBob is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #8
Jun 7th, 2008
Originally Posted by RWGBob View Post
OPEN "O",1,"PRINT.TMP"
PRINT #1, "Just testing the code."
CLOSE 1
SHELL "C:\PATH\WORDPAD.EXE"

That's all there is to it.
Oops!

SHELL "C:\PATH\WORDPAD.EXE PRINT.TMP"
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 5
Reputation: printfil is an unknown quantity at this point 
Solved Threads: 1
printfil printfil is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #9
Jun 7th, 2008
Originally Posted by RWGBob View Post
SHELL "C:\PATH\WORDPAD.EXE"

That's all there is to it.
That's not enough. This way all the printer control codes embedded in the text would end up on paper.
You should create an RTF file for Wordpad instead of a TXT, and translate all the Bold, Condensed and other control codes sent by the Basic program into the corresponding RTF commands.
Regards,
Davide
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 8
Reputation: Jackgrt is an unknown quantity at this point 
Solved Threads: 0
Jackgrt Jackgrt is offline Offline
Newbie Poster

Re: print to USB from Qbasic

 
0
  #10
Jun 23rd, 2008
Originally Posted by paul2594 View Post
I recently updated my system to XP-2 with a pentium III. I have a number of qbasic programs I developed to use in my hobbies and lo and behold, I can't print to my usb port. The programs run okay. I should think this is a problem that has been solved many times but I haven't run acrossed the answer. Perhaps print-to-file then open and print the file with notepad or something. Any ideas?

Thanks, Paul

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

I had the same problem, & this works for me. Good luck. Jack
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC