Re: Cheque Writing with VB

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Joe O" <jp3BlessNoSpam@xxxxxxxxxxx> wrote in message
news:u7i1QTk3FHA.3592@xxxxxxxxxxxxxxxxxxxxxxx

> Sorry I forgot clarify that point. These are preprinted cheques with
> institution codes/Numbers and everything thing in place. Much like
> cheque book but in A4 format... the top part is the actual cheque
> while the bottom part stores information related to the cheque.

All you need to do is measure (with a standard rule) the positions on the
actual A4 page where you want the various text items and numbers to appear.
Then you can use Printer.CurrentX and Printer.CurrentY to set the position
before printing each item. Remember that the position of a printed string is
actually the position of the top left corner of the first character of that
string. If you want to instead position the string with respect to the
bottom left corner of the first character then you can use
Printer.TextHeight to get the height of each character and adjust your code
accordingly. That would place the text so that the bottom of the character
cells sits at the appropriate y coordinate (the TextHeight of each character
in a specific font name and size is the same). Remember that the bottom of a
character cell is the bottom of the character cell itself (which is
approximately the same position as the bottom of the descender on characters
such as "y". If you instead want the descenders to fall below the line your
are printing to then you can get further information using the
GetTextMetrics API or (perhaps more simply) just use an offset of 0.25 times
the TextHeight (or is that 0.2 - I can;t remember offhand, but I'm sure
Jerry will remember and he'll probably post an answer himnself soon). Oh,
one more thing, you'll also need to add some code to set the printer origin
to the top left corner of the physical page (rahter than the default top
left corner of the printable area). It's all quite simple, but it does need
a bit of though to get right. I haven't got time at the moment, but if
nobody has produced sample code for you by tomorrow then post again and I'll
knock some up for you.

Mike



.



Relevant Pages

  • Re: Since everyone else is showing off their collections...
    ... >>>The bottom left one is a character from Neon Genesis Evangelion, ... Okay, okay, I'll give you a hint: As far as I know, the only "Lain" ...
    (rec.arts.anime.misc)
  • Re: Folder and File naming question
    ... This will make a little square character that will sort to the ... listed alpabetically at the BOTTOM of the alphabet.. ...
    (microsoft.public.windowsxp.general)
  • Re: EM_CHARFROMPOS in RichEdit
    ... It is quite convenient to get the character position ... the offset is relative the the RTB. ... Dim LRet As Long, CPos As Long ... '-- set up POINT to accord with bottom left-hand corner of RTB. ...
    (microsoft.public.vb.general.discussion)
  • Re: When is a NULL Not a NULL ?
    ... let's start with the statement at the bottom: ... considered investigative in character. ... While it may work well in theory, and may even work well in reality, we ... be forthcoming. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: altering a cheque - an offence - how serious?
    ... ink numerals along the bottom of the cheque which does not include the date. ... A degausser won't work because the ink isn't actually magnetised, at least not by design. ...
    (uk.legal)