Home > BSPrinter documentation > Reference

PrintForm Method

Applies to: PrintPreview, IPrinterEx object

  Return Type:     None.  
 
  Parameter(s):  
   In     Required     Form     As     Object  
   In     Optional     X     As     Variant  
   In     Optional     Y     As     Variant  
   In     Optional     OnlyClientArea     As     Boolean     Default value: False  
   In     Optional     ScaleFactor     As     Single     Default value: 1  
   In     Optional     CenteredHoriz     As     Boolean     Default value: False  
   In     Optional     ShrinkToFit     As     Boolean     Default value: True  
   In/Out     Optional     PrintedX     As     Variant  
   In/Out     Optional     PrintedY     As     Variant  
   In/Out     Optional     PrintedWidth     As     Variant  
   In/Out     Optional     PrintedHeight     As     Variant  


Description:

Prints the image of a form.

It is similar to PrintWindow, but the first argument accepts a Form object instead of a window handle.

Parameters:

Form: form to be printed.

X: the X position where the image will be printed. If not supplied, CurrentX is used.

Y: the Y position where the image will be printed. If not supplied, CurrentY is used.

OnlyClientArea: If True, only the client area will be printed (not the title bar and borders)

ScaleFactor: Scale of the printed image, the default is 1.

PrintedX Returns the X position where the image was printed.

PrintedY Returns the Y position where the image was printed.

PrintedWidth Returns the Width of the printed image.

PrintedWidth Returns the Height of the printed image.

Notes:

It requires Windows XP or later.
Controls that use GDI+ may not appear.

Printer.CurrentX won't be updated, but Printer.CurrentY will be positioned after the image.

See Also:

PrintWindow method