PrintForm Method (WINDOW)
PLBCMP GUI Only
The PrintForm method output the entire contents of a WINDOW including the non-client area to a print device. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A WINDOW object that is accessed.
return
Optional. A Numeric Variable that indicates the success or failure of the method.
hdc
Required. A Numeric Variable that specifies the handle of the device context.
left
Required. A Numeric Variable that specifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
top
Required. A Numeric Variable that specifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
width
Required. A Numeric Variable that specifies the width of the destination rectangle.
height
Required. A Numeric Variable that specifies the height of the destination rectangle.
Flags Affected: EOS, OVER, ZERO
Note the following:
The {hdc} value can be obtained using the GETFILE statement with the HDC keyword for a PFILE that has been opened using a PRTOPEN operation.
When the {hdc} input parameter for this method has been obtained for a PRTOPEN PFILE, this method must be executed after a PRTPAGE operation that has printed data.
If the {width} and {height} parameters are set to a value of zero, this method uses the current display and printer resolutions to determine the default width and height used when printing the form.
The width, height, top, and left values are expressed in logical units as defined for the {hdc} device context in Windows.
The PrintForm method is a Window's function and not interpreted by the runtime.
The returned value is zero if the method did not print the form. The returned value is non-zero if the form was printed.
If the value returned is zero, the ZERO Condition Flag is set.
The OVER and EOS Condition Flags are always cleared.
For improved performance in the Application Server environment, do not specify the optional return value unless needed.
This method is not available when using the PL/B Web Server.
See Also: Method Syntax, WINDOW Methods
![]() |