Discussion:
Printer Object VB6.0
(too old to reply)
rudycoop
2004-02-24 23:46:28 UTC
Permalink
I have a problem using the printer object in VB for w2k, specifically printing to a Zebra printer using the "Generic / Text Only" driver

My program runs in winnt and win98se using the same printer object without a problem

Here is the problem in W2K

It seems to strip out the control characters going to the printer. I can print to my Zebra printer from notepad with the control characters embedded, no problem, but from VB6.0 it won't even initialize the printer. In the printer setup I can give it the initialization string and ending string and it will work. Thats why I'm enclined to believe that somehow the printer object is somehow stripping out the control characters

Any suggestions

thx

rud
MikeD
2004-02-25 01:05:18 UTC
Permalink
Post by rudycoop
I have a problem using the printer object in VB for w2k, specifically
printing to a Zebra printer using the "Generic / Text Only" driver.
Post by rudycoop
My program runs in winnt and win98se using the same printer object without
a problem.
Post by rudycoop
It seems to strip out the control characters going to the printer. I can
print to my Zebra printer from notepad with the control characters embedded,
no problem, but from VB6.0 it won't even initialize the printer. In the
printer setup I can give it the initialization string and ending string and
it will work. Thats why I'm enclined to believe that somehow the printer
object is somehow stripping out the control characters.
Post by rudycoop
Any suggestions ?
I don't know for sure, but I really doubt it has much, if anything, to do
with VB's Printer object. Rather, it probably has more to do with the
printer driver. Keep in mind that drivers are different for Win9x/NT and
Win2K (and later). Many later drivers (particularly those for Win2K and
later) might not support control codes or escape codes. Those are primarily
a DOS thing.

You MIGHT try opening the printer's port directly, thereby bypassing the
printer driver. I know this works for a printer connected to a parallel or
serial port (and depending on the printer actually supporting the control or
escape code). I don't know about a printer connected to a USB port.

Mike

Loading...