473,387 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

USB port printer

How can I use deirectly a printer attached to a USB port through VB6 coding?d
Jul 15 '07 #1
8 10552
Killer42
8,435 Expert 8TB
How can I use deirectly a printer attached to a USB port through VB6 coding?
Don't. Use the Printer object. It's much safer.
Jul 17 '07 #2
Killer42
8,435 Expert 8TB
Don't. Use the Printer object. It's much safer.
Azizul Haq, you appear to have used the "Report" button instead of the "Reply" button. Please try again.
Aug 10 '07 #3
Many of my clients want to use the printer to print discrete page and want the printer to stop where the bill finishes. I use: Open "Lpt1" for output as #1
which works better in win98 and XP but it fails for USB printer and network printer.
The printer object gives full page in XP because Printer.Height property does not work in XP. Please Help for USB port and network printer.
Aug 12 '07 #4
Killer42
8,435 Expert 8TB
many of my clients want to use the printer to print descrete page and want the printer to stop where the bill finishes. I use: Open "Lpt1" for output as #1
which works better in wn98 and xp but it fails for usb printer and network printer.
The printer object gives full page in xp because printer.height property does not work in xp. Plese Help for USB port and network printer.
I don't know anything about using USB or network printers, perhaps someone else here does? Perhaps it's just a matter of finding the correct port name to open.

However, I would like to ask - have you tried adjusting the Printer.PaperSize property?
Aug 12 '07 #5
Printer.PageSize picks the pre-adjusted paper size but does not work as I want. My dynamic paper size starts from 7 lines and maximum paper size is up to 500 lines on continuous paper. It should stop anywhere when the lines finish.
Aug 14 '07 #6
Killer42
8,435 Expert 8TB
Well, I'm fresh out of ideas so I'll throw in a bunch of links to possibly relevant sites I just found in Google...

http://www.lvr.com/parport.htm
http://www.dataq.com/products/software/activex.htm
http://www.brothersoft.com/downloads/vb-printer.html
http://www.thescripts.com/forum/thread677530.html


http://www.techspot.com/vb/topic12772.html
http://geekswithblogs.net/dtotzke/articles/26204.aspx

If these don't help, I recommend further searching, through Google or perhaps on the MSDN website.
Aug 14 '07 #7
Killer42
8,435 Expert 8TB
Just a thought. If you run this...
Expand|Select|Wrap|Line Numbers
  1. Dim p As Printer
  2. For Each p In Printers
  3.   Debug.Print p.Port, p.DeviceName
  4. Next
...then try using the port name reported, instead of LPT1, what happens?
Aug 15 '07 #8
Killer42
8,435 Expert 8TB
... I want to take a print of a msflexgrid in vb6 ...
Since this is a new question, please start a new discussion thread for it. Don't tack it onto the end of this one.
Aug 18 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Mathew | last post by:
I am looking to write a program with Microsoft Visual Basic 6 that writes out to the com port. After the inital Connection. I will be connecting at 9600, 8 data bits, with hardware flow control. ...
4
by: Lizard King | last post by:
Hi. I have a computer running a third party software (POS). The thing is this application opens the printer port and I need to use another program while the first one is still running. Since...
1
by: EN | last post by:
Hi, I'm trying to send 8 bits to the lpt port. I'd like to use VB 6.0. Can this be done? VB can send data to a printer, but can it go as low as actually sending bits? I think VB can only send...
1
by: mimisam | last post by:
hi, I am using Win XP and writing an application to check POS devices (printer and cash drawer).In the application I need to choose the port which the device is connected to. If the port chosen...
3
by: Joca | last post by:
Hi, I have a process system that generate events and send them to a printer port, and in the end a printer writes it as a text line on a paper. I would like to chatch this text line...
6
by: Bradley1234 | last post by:
What is the way to send/read bits to the printer port at the hex 3F8-3FF or any other legacy io space?? Does C# include the methods to drive the printer or other ports? tia
1
by: cddeboer | last post by:
I am using MS-Access XP and am using the following syntax Set Application.Printer = Application.Printers("PrinterName") to change the default printer. Then when I go to check the associated...
10
by: sklett | last post by:
I'm trying to send some printer commands (ZPLII) to an attached USB printer using the SerialPort component. I didn't get very far at all. In fact I haven't gotten anywhere. The first problem I...
0
by: Charles Crawford | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: =?Utf-8?B?Q2hhcmxpZQ==?= | last post by:
Hi, This apparently is a common problem and I've yet to read a solution that actually works for my specific situation. I have a Zebra RW220 printer that I connect to via Bluetooth connection...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.