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, PowerBuilder 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, PowerBuilder prints the screen at its original height.


Return value

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

Examples

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

Print

PrintClose

PrintOpen