From: Junior on
Thank you Master it works!!

"Mike Williams" wrote:

> > "Junior" <Junior(a)> wrote in message
> > news:D77A2D83-8788-4644-B111-2EAF3F76F8C8(a)
> > 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:
> Mike
> .
From: Mike Williams on
"Junior" <Junior(a)> wrote in message

> Thank you Master it works!!

Well I'm sure it does work, but there's no need to call me Master! In fact I
would much prefer it if you called me nothing at all and just gave me an
honest answer to the question I posed in relation to the Printer.Print code
you posted which you told us used to work okay to deliver control sequences
to your older Zebra printers :-)

Come on, Junior, spill the beans. That Printer.Print code did not work, did
it, and it was some other code you actually used, probably opening the port
as a file for output?


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