Board index » delphi » VB programmer needs advice from real programmers

VB programmer needs advice from real programmers

this is a message that i posted on the VB groups, but no one can answer.
I'm an old C and Delphi programmer, but my company made me program in VBasic
(*sniff*), now I forgot most of my REAL programming skills.  None of the VB
programmers can answer this, so i decided to see if the pro's know...

Hi all,
   I am currently writing an automation package that includes a routine to
print to an old Okidata 9-pin dot matrix printer (possibly older than me).
I haven't had to print to a dot matrix since the dark ages (when i was on a
Mac).

  The problem is that I am printing to Tags that are about two inches by
four inches, so there are eight to a standard size page.  The first seven
tags print fine, but the last one screws up and prints all over the next
several tags.

  Can someone give me a bit of insight as to how the NewPage might be
appropriate for a Line Feed printer (if it is a line feed).  I wouldn't mind
writing to a file, and then sending the entire file to the printer, but I
would need the name of a resource to look up the code that the printer needs
(old HP code).

ANY help or insight is GREATLY appreciated,
  "The Kid"

Dan
DBr...@Chicopee.TurboCare.com

 

Re:VB programmer needs advice from real programmers


I don't know if this will help  but i remember sending Page Feeds to move to
the next page,  Char 12 if i remember..
use <LF><CR> at the end of each line (Char 10 and 13)
Char 8 are Tabs ect,,,
also i remember that some printers had switches to allow the use of  <CR> with
out the LF... , this is not a good aprouch and should be turned off because many

print unitlties need to brings the head back and repossition it with out a line
feed.

Quote
TurboCare Employee wrote:
> this is a message that i posted on the VB groups, but no one can answer.
> I'm an old C and Delphi programmer, but my company made me program in VBasic
> (*sniff*), now I forgot most of my REAL programming skills.  None of the VB
> programmers can answer this, so i decided to see if the pro's know...

> Hi all,
>    I am currently writing an automation package that includes a routine to
> print to an old Okidata 9-pin dot matrix printer (possibly older than me).
> I haven't had to print to a dot matrix since the dark ages (when i was on a
> Mac).

>   The problem is that I am printing to Tags that are about two inches by
> four inches, so there are eight to a standard size page.  The first seven
> tags print fine, but the last one screws up and prints all over the next
> several tags.

>   Can someone give me a bit of insight as to how the NewPage might be
> appropriate for a Line Feed printer (if it is a line feed).  I wouldn't mind
> writing to a file, and then sending the entire file to the printer, but I
> would need the name of a resource to look up the code that the printer needs
> (old HP code).

> ANY help or insight is GREATLY appreciated,
>   "The Kid"

> Dan
> DBr...@Chicopee.TurboCare.com

Re:VB programmer needs advice from real programmers


Quote
> I'm an old C and Delphi programmer, but my company made me program in
VBasic
> (*sniff*), now I forgot most of my REAL programming skills.

My sympathies.....

Quote

>   The problem is that I am printing to Tags that are about two inches by
> four inches, so there are eight to a standard size page.  The first seven
> tags print fine, but the last one screws up and prints all over the next
> several tags.

I remember, somewhere back in my youth(???), when using Turbo Basic, I used
to have a devil of a time printing to dot matrix printers because of the
settings in the printer that caused it to skip X-amount of space between
pages because of the old fan-fold style continuous paper. It seems that I
had to turn off the automatic skip functions of the printer but I can't say
with certainty that it solved all of the printer problems.

Don't know if this helps, but you have my deepest sympathy for having to put
up with the tortures of Basic programming!!!! <G>

Woody

Re:VB programmer needs advice from real programmers


Quote
> Hi all,
>    I am currently writing an automation package that includes a routine to
> print to an old Okidata 9-pin dot matrix printer (possibly older than me).
> I haven't had to print to a dot matrix since the dark ages (when i was on
a
> Mac).

You really do need the escape codes for the printer, I would try using the
epson standard escape codes, I doubt ( though not sure), it would use the HP
standard code set, if you can't get the original manual.

And as I am sure you know, setting the printer will always start with a
chr$(27), and literal characters are sent as is, chr$(9) as tab, chr$(10) as
a line feed, chr$(13) as a carriage return etc.

Then in pseudo code, from here you would normally set the tabs as somthing
like chr$(27)+"(t4" etc.

Tom.

Re:VB programmer needs advice from real programmers


thank you very much everyone for the overwhelming support. if it doesnt
work, ill try the ol' sledgehammer approach.

dan

Quote
tm <t...@hotmail.com> wrote in message

news:vkLy3.6125$Ze2.166878@nnrp3.clara.net...
Quote
>> Hi all,
>>    I am currently writing an automation package that includes a routine
to
>> print to an old Okidata 9-pin dot matrix printer (possibly older than
me).
>> I haven't had to print to a dot matrix since the dark ages (when i was on
>a
>> Mac).

>You really do need the escape codes for the printer, I would try using the
>epson standard escape codes, I doubt ( though not sure), it would use the
HP
>standard code set, if you can't get the original manual.

>And as I am sure you know, setting the printer will always start with a
>chr$(27), and literal characters are sent as is, chr$(9) as tab, chr$(10)
as
>a line feed, chr$(13) as a carriage return etc.

>Then in pseudo code, from here you would normally set the tabs as somthing
>like chr$(27)+"(t4" etc.

>Tom.

Re:VB programmer needs advice from real programmers


If you want to more about this stuff
just let me a mail

Ecz :topmargin
Ec&l#p  number of lines

joseph.venquel...@skynet.be

Quote
>ANY help or insight is GREATLY appreciated,
>  "The Kid"

>Dan
>DBr...@Chicopee.TurboCare.com

Re:VB programmer needs advice from real programmers


hammers are very useful in the i.t. business i find. by the way, i'm
probably telling you somthing you already know here, but the okidata dot
matrix i once used could also be set, line spacing etc, via a set of dip
switches, fooled me for ages.

tom.

Re:VB programmer needs advice from real programmers


Your note does not say what operating system you're using,
or which Oki printer. From my memory, the Oki 320 driver that
shipped with Windows '95 was flawed - it would not set the page
length correctly. Oh, it would appear to, then it would mess up and
skip several pages. Caused me a world of pain until I went to their
website and got the right drivers. (I was trying to print one-up
tractor-feed 2x3" labels).

Al

Quote
TurboCare Employee wrote:
> <snip>
> Hi all,
>    I am currently writing an automation package that includes a routine to
> print to an old Okidata 9-pin dot matrix printer (possibly older than me).
> I haven't had to print to a dot matrix since the dark ages (when i was on a
> Mac).

>   The problem is that I am printing to Tags that are about two inches by
> four inches, so there are eight to a standard size page.  The first seven
> tags print fine, but the last one screws up and prints all over the next
> several tags.

<snip>

Other Threads