[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TCustomForm.GetFormImage

Makes a Bitmap image with the Form content.

Declaration

Source position: forms.pp line 721

public function TCustomForm.GetFormImage: TBitmap;

Function result

Bitmap created in the method with the image for the form.

Description

GetFormImage is a TBitmap function used to get a bitmap image with the contents for the form instance. The return value must be managed by the caller to ensure that the image is freed.

GetFormImage sets the size for the TBitmap instance to the values in the ClientWidth and ClientHeight properties. The GetWindowRect routine in lclintf is called to get the display rectangle for the form Handle. The PaintTo method is called to draw the rectangle to the Canvas in the bitmap.

The return value can be Nil if an Exception was raised and handled in the method.


Version 3.2 Generated 2024-02-25 Home