PrintPicture, PrintPicture2 Properties

Purpose

Returns the Picture object created with PrintForm.

Syntax

Set p1 = Form.PrintPicture

Set p1 = Form.PrintPicture2

p1:Picture Object

Description

The PrintForm method creates a Picture object from the Form. This Picture object is also obtainable using the PrintPicture or PrintPicture2 properties. PrintPicture returns an image of the client area with all visible objects and bitmaps of the Form object. PrintPicture2 returns the same, including the window borders.

Example

Global Picture p1, p2 : Global h As Handle

OpenW 1 : AutoRedraw = 1

Color QBColor(2) : PCircle 200, 200, 100, 35, 220

Set p1 = Me.PrintPicture

Set p2 = Me.PrintPicture2

Dlg Print Win_1, 0, h

If h <> 0

SetPrinterHDC h

Output = Printer

Printer.StartDoc "Test"

Printer.StartPage

PaintPicture p1, 0, 0

Printer.NewFrame

PaintPicture p2, 0, 0

Printer.EndPage

Printer.EndDoc

Output = Me

EndIf

CloseW 1

This prints the form in the size of a stamp. Use the other parameters of PaintPicture to scale the bitmap.

See Also

Form, Printer, PrintForm, Lprint, StartDoc

{Created by Sjouke Hamstra; Last updated: 21/10/2014 by James Gaite}