ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 4th, 2003, 04:03 PM
tkleen tkleen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 2 tkleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Printing to USB port in VB6

I want to print directly to a continuous forms dot-matrix printer in VB6 on a machine that has no parallel port. I need to send control codes directly to the printer to plot data in real time. This worked fine when I used LPT1: (I opened LPT1: as a binary file and used Put statements), but I don't know how to do this with a USB port. Can anybody help?

Reply With Quote
  #2  
Old June 4th, 2003, 04:43 PM
iahmed iahmed is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: USA
Posts: 171 iahmed User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 58 sec
Reputation Power: 14
Which USB 1.0 or 2.0 specification?
Is your printer connected to USB?

Reply With Quote
  #3  
Old June 4th, 2003, 04:46 PM
tkleen tkleen is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 2 tkleen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm using USB 1 now, but will be using USB 2 also. The printer is a parallel printer that is connected using a USB-to-Parallel adapter.

Reply With Quote
  #4  
Old December 5th, 2003, 04:58 AM
rapid rapid is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Sydney
Posts: 1 rapid User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Did you find out how to write to a USB port in VB6?

Reply With Quote
  #5  
Old February 2nd, 2004, 05:45 AM
alvinyeung alvinyeung is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 alvinyeung User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
VB6 printing to USB printer

Quote:
Originally Posted by tkleen
I want to print directly to a continuous forms dot-matrix printer in VB6 on a machine that has no parallel port. I need to send control codes directly to the printer to plot data in real time. This worked fine when I used LPT1: (I opened LPT1: as a binary file and used Put statements), but I don't know how to do this with a USB port. Can anybody help?


I met same problem. did anyone solve it? thx

Reply With Quote
  #6  
Old February 2nd, 2004, 08:52 AM
alansmith alansmith is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Seaton Devon
Posts: 18 alansmith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 44 sec
Reputation Power: 0
Send a message via MSN to alansmith Send a message via Yahoo to alansmith
Hmm, you are making that so complicated.

Why dont you map ltp1 to the usb port then vb would behave normally.

From the command prompt type:-
net use LPT1 \\pcname\printername
ie.
"net use LPT1 \\officepc\epson"

Reply With Quote
  #7  
Old February 3rd, 2004, 07:03 AM
alvinyeung alvinyeung is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 alvinyeung User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
it is a standalone pc .

Quote:
Originally Posted by alansmith
Why dont you map ltp1 to the usb port then vb would behave normally.

From the command prompt type:-
net use LPT1 \\pcname\printername
ie.
"net use LPT1 \\officepc\epson"


Hi, the pc is standalone.
Besides, I can see something in the printer manager of USB printer(Canon). But it doesn;t start to print.
However, it works fine in parallel printer.

any suggestion please ?

Reply With Quote
  #8  
Old February 8th, 2004, 09:27 PM
ash5g ash5g is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 ash5g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Found this on Google

You have to use the printer object, one of the posts describes how in this thread. You create a printer object and use the printer driver to send the data to the printer. It's not as simple as just opening the LPT port but will get the job done.

URL

Are you sure that the paralell to USB converter does not create a LPT port? Most of the ones I've played with create a LPT2 or LPT3 port, which you can use just like a normal LPT1 port.

Reply With Quote
  #9  
Old February 16th, 2004, 03:48 AM
alvinyeung alvinyeung is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 alvinyeung User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
HOw can it print line by line (in USB printer -canon)

Hi, i have followed the instruction "using CommonDialog" to print. But the usb printer is NOT starting to print until receiving "Printer.Enddoc" or "printer.newpage".

so how can i print it line by line in real time?

Thanks

Reply With Quote
  #10  
Old July 17th, 2014, 03:11 AM
fjimage fjimage is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2013
Posts: 1 fjimage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 56 sec
Reputation Power: 0
i only have advice on how to open USB
You don't really 'open' a USB port.
They are not like serial COM ports.

You just need to talk to the driver of your device. It doesn't really matter what USB port you plugged in to.

So you need to work according the the API/SDK for the device you want to talk to.

If the USB device is really a USB to Serial converter, and thus it appears as COM4, then talk to it like any other serial port - don't complicate it by thinking of it as a USB port.
sorry couldn't be more help on this

Reply With Quote
  #11  
Old January 19th, 2015, 02:50 AM
zervok005 zervok005 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2014
Posts: 1 zervok005 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 6 sec
Reputation Power: 0
Hellooooo is it anybody out here?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Printing to USB port in VB6


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap