From: Mike Williams on
"Junior" <Junior(a)discussions.microsoft.com> wrote in message
news:EE252A79-5135-492A-B5AD-2D85BFDAC069(a)microsoft.com...

> mmm, your are right. let me explain
> Iam working with vb 6 sp5, i use the same code for small
> zebra printer, but now i have to configure Zebra ZM400,
> i tried to se the same cone but i each time that i print i only
> see the character, no barcode, and nothing else. I don't
> understand why the code is not working with Zebra ZM400.
> N
> Q250,1
> q800
> OFf
> A160,10,0,2,1,3,N,"" . . . etc

But the thing is, as has already been explained to you, this is a VB6
newsgroup and you have not posted any VB6 code at all. You have posted just
a bunch of control codes that you are apparently sending to the Zebra. Your
problem may or may not be down to a problem in your VB6 code, but since you
have not posted any VB6 code then we have know way of knowing whether you
are sending the data correctly or not. In fact, in view of what you have
posted, the problem is quite likely to be simply that you are sending the
wrong codes to the ZM400, causing it to fail to perform the task you are
expecting it to perform. I've just had a look at the Zebra printer manual
download site and there appear to be a number of different user manuals for
the quite large number of printers they produce, indicating that there are
indeed some differences between them, some of which may or may not include
differences in the codes required to set them to your desired printer
emulation or whatever. What you really need to do is download the user
manual appropriate to your own specific ZM400 model and determine from that
manual what codes you need to send to the ZM400 in order to produce the
output you are after, and then check the data you are actually sending to
see if it is the same. If you are very lucky them somebody here who actually
uses a Zebra printer of the same model you have might be able to tell you if
the codes you are apparently sending to it are correct, but otherwise you
really need to ask in a Zebra forum or newsgroup. If you want to ensure that
the "VB6" part of it is correct then you may post your actual VB6 code and
people here will tell you whether it actually will correctly send the data
or not, but only a Zebra user will be able to tell you for certain whether
you are sending the correct data and whether there is anything specific to
the Zebra model you are using that might cause problems with that data.

Mike



From: Mike Williams on
"Junior" <Junior(a)discussions.microsoft.com> wrote in message
news:EE252A79-5135-492A-B5AD-2D85BFDAC069(a)microsoft.com...
>> I don't understand why the code is not working
>> with Zebra ZM400. Thankz

Actually, when I said in my previous response that only a Zebra user will be
able to tell you for certain whether
you are sending the correct data to the printer, I might actually have done
you a favour there. What I meant of course is that an answer regarding
whether or not the data is correct will *most likely* come from someone who
uses Zebras themselves and that others would not be prepared to put in the
required time to download the appropriate manual and check the required data
for you, but of course some people who do not use Zebras but would like to
"make a point and prove me wrong" (such as Tom Shelton for example) might
very well be prepared to do the donkey work for you just to make a point, so
you might actually get an answer from him ;-)

Mike



From: Junior on
Below is my vb 6.0 sp5 code

Code Bar
Printer.Print "Q160,24q800OFf"

Printer.Print "A5,10,0,1,1,2,N,"RICE GIANT 2 K"
B5,60,0,E30,2,2,30,N,"7441024100018"
A5,94,0,2,1,1,N,"7441024100018"
A90,115,0,2,1,2,N,"› 13,55"

Printer.Print "P1"
Printer.Print "^ee"
Printer.EndDoc


Description
Printer.Print "Q160,24q800OFf"

Printer.Print "A160,10,0,2,1,3,N,"
"A160,60,0,2,1,3,N,"RICE GIANT 2 K"
"A250,130,0,2,2,3,N,"› 13,55"
Printer.Print "P1"
Printer.Print "^ee"
Printer.EndDoc

Thank you

"Dee Earley" wrote:

> On 12/08/2010 17:07, Junior wrote:
> > mmm, your are right. let me explain
> > Iam working with vb 6 sp5, i use the same code for small zebra printer, but
> > now i have to configure Zebra ZM400,
> > i tried to se the same cone but i each time that i print i only see the
> > character, no barcode, and nothing else.
> >
> > I don't understand why the code is not working with Zebra ZM400.
> > Thankz
>
> That still amounts to "it doesn't work.
>
> Please try elaborating
> (And as you didn't read it:
> http://hashvb.earlsoft.co.uk/User:Dee/It_doesn%27t_work%21)
>
> --
> Dee Earley (dee.earley(a)icode.co.uk)
> i-Catcher Development Team
>
> iCode Systems
>
> (Replies direct to my email address will be ignored.
> Please reply to the group.)
> .
>
From: phil hunt on
Shot in the dark. Does your new printer use USB. Your Printer.Print may not
work with USB printer.


From: Mike Williams on
> "Junior" <Junior(a)discussions.microsoft.com> wrote in message
> news:D77A2D83-8788-4644-B111-2EAF3F76F8C8(a)microsoft.com...
> Below is my vb 6.0 sp5 code
> Printer.Print "Q160,24q800OFf"
> Printer.Print "A5,10,0,1,1,2,N,"RICE GIANT 2 K"
> B5,60,0,E30,2,2,30,N,"7441024100018"
> A5,94,0,2,1,1,N,"7441024100018"
> A90,115,0,2,1,2,N,"› 13,55"

As I've said, I have never used a Label Printer but from the above code it
looks as though you want to send printer control codes and other raw data
directly to the Zebra. In fact from a quick look at the Zebra EPL commands
in the manual that is downloadable from the Zebra web page it looks as
though the first line of your code is attempting to set the Form Length and
Form Width and some other options (cut position or whatever). If that is the
case then you are not going to do it by Printing your raw data in the above
fashion using the VB6 Printer Object. In order to send such stuff (unless
Zebra have done something really strange with their drivers) you need to
address the printer directly to send raw data to it, completely bypassing
the Windows driver. This of course is possible, but it does make me wonder
why you said in your initial post that your code worked fine with other
Zebras until you got the new Zebra ZM400, because as far as I can judge that
page setting code yup have shown us using Printer.Print would not work with
any Zebra printer (at least not inasmuch as setting the page is concerned,
although it might print the "Q160,24q800OFf" as a straight forward piece of
text). So, before we go any further, perhaps it might be a good start if you
were to thoroughly check the information you are sending us in respect of
your question, before you send it, to make sure that you are telling it
"exactly as it is", rather than either embellishing it or missing out
something of importance. So, my first question to you is, "Did that EXACT
code correctly set the page up properly on your old Zebra printers, or was
it really some other code you used that worked"? The answer to this is
important because we cannot help you unless you give us accurate information
about your problem.

One common way of sending raw data to a printer (which is what I am sure you
need to do to accomplish your desired task) was to Open the Printer Port for
Output (using the same VB methods that opens standard files for output) and
then Print data strings to it in the same way that you would Print data
strings to a standard file, and then Close the file when you had finished.
Are you /sure/ that is not what you were doing with the old Zebra printers
when you said your code worked. If that is the case then your code would
have been nothing like the code example you have just posted. Also, that
method (opening the printer port as a file and writing it to a file) would
have worked fine with printers connected via the parallel port, but /not/
with printers connected via a USB port, so if your old Zebra printers were
parallel connected and your new ZM400 is USB connected then that would
explain why the code you used successfully in the past does not work any
more. It still would not explain why you sent us Printer.Print code telling
us that "it used to work" when in fact to the best of my knowledge that
specific code would never have worked on any of your Zebras and you must in
fact have used some other code (probably the File writing code I mentioned).

Anyway, on the assumption that your problem is roughly as I have outlined
above then you will be able to use the various functions in winspool.drv to
send raw data directly to your Zebra printer from VB6, whether it is USB
connected or not. Check out the example at the following link:

http://support.microsoft.com/kb/154078

Mike




First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: ActiveX EXE Not Execute
Next: Trapping Sheet selection