PrintScreen

Description

Prints the screen image as part of a print job.

Syntax

PrintScreen ( printjobnumber, x, y {, width, height } )

Argument

Description

printjobnumber

The number the PrintOpen function assigns to the print job.

x

An integer whose value is the x coordinate on the page, in thousandths of an inch, of the upper-left corner of the screen image.

y

An integer whose value is the y coordinate on the page, in thousandths of an inch, of the upper-left corner of the screen image.

width (optional)

The integer width of the printed screen in thousandths of an inch. If you omit width, PocketBuilder prints the screen at its original width. If you specify width, you must also specify height.

height (optional)

The integer height of the printed screen in thousandths of an inch. If you omit height, PocketBuilder prints the screen at its original height.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument’s value is null, PrintScreen returns null.

Usage

You must install the FieldSoftware PrinterCE SDK before you can use print methods in PocketBuilder applications deployed to a device or emulator. An evaluation version of this software is available from the FieldSoftware Web site.

Examples

Example 1

This statement prints the current screen image in its original size at location 500, 1000:

long Job

Job = PrintOpen()

PrintScreen(Job, 500,1000)

PrintClose(Job)

See also