Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Escape! V3.0 - <b>hpatsay()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpAtSay()

Print text anywhere on a page (similar to Clipper @ SAY)


Syntax

hpAtSay(<nRow>, <nCol>, <cString> [,<cUnits>])


Parameters

<nRow>
The row coordinate.  Can be specified down to four
decimal places.

<nCol>
The column coordinate.  Can be specified down to four
decimal places.

<cString>
The character string to print.

<cUnits>
The units of measurement to be used for printing.
Defaults to 'R'.  Valid values are:
"R"     Rows and Columns.
"I"     Inches.
"M"     Millimeters.


Returns

0
Successful.

-10
Font information is missing.  hpSetFont() must be called
first.

-12
Wrong number of parameters were passed.

-17
Incorrect parameter type was passed.


Remarks

hpAtSay() replaces the @ SAY command, allowing complete page
oriented usage of the laser printer.  hpAtSay() prints anywhere on the
page in any order, regardless of row position, without any worry of page
ejects.

If you do a lot of report writing, hpAtSay() will be one of the most useful
functions you will come across.  With hpAtSay(), you have the ability to
print anywhere on the page.  You can do says at the bottom of the page,
then back at the top because hpAtSay() uses the laser printer's ability to
move the printer cursor and bypasses Clipper's.

One example of how hpAtSay() can make programming tasks easier is
when creating multiple column reports. You no longer have to perform
tedious calculations to figure what the last line of the first column will
be, so that you'll know what to print on the second column. You can now
print vertically, one column at a time. Use hpAtSay() to print down the
first column of the page.  When you reach the last line, go back up to
the top of the second column and continue printing.

hpAtSay() is also very useful for printing headers and footers on your
reports.  Simplify your code by printing headers, titles, and footers all in
one section at the beginning of your program.  Then print the body of
your report.

Note:  To see an actual example of how hpAtSay() can be used to create
multi-column reports, see HPFONTS.PRG which is included on your
distribution diskette.


Support By

All HP LaserJet printers


Example

hpPrintOn()
hpConfig()
hpSetFont()

hpAtSay(59, 0, 'This is the bottom of the page')
hpAtSay(1, 0, 'This is the top of the page')
hpAtSay(30, 0,' This is the middle of the page')
hpAtSay(0.5, 0,'This is half a line down')

hpReset()
hpPrintOff()

See Also: hpIAtSay() hpCenter() hpRJust() hpWrap()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson