createPictureIndirect

createPictureIndirect(entireWindow:    Boolean;
                      includeChildren: Boolean): Binary;

The createPictureIndirect method of the Control class creates a short binary that contains an instruction concerning the window to be copied. When the binary is assigned to a Picture control property, the picture is created using the current image of the requested window.

This method, which achieves the same as the Control class createPicture method (that is, it creates a bitmap for the receiver control), improves JADE thin client mode performance as it does not have to pass large binary large objects (blobs) back and forth between the presentation client and the application server.

The parameters for this method are listed in the following table.

Parameter Description
entireWindow If true, copies the entire window. If false, copies only the client area of the control.
includeChildren If true, includes any children in the created image. If false, no children are included in the created image.

The createPictureIndirect method creates an image by drawing the control (and its children, if required) and replaying any drawing commands saved while the autoRedraw property is set to true. The process does not scrape the image off the screen.

The code fragment in the following example dynamically creates a color image to be placed in a list box.

picture1.backColor         := Red;
picture1.borderStyle       := 1;
listBox1.itemPicture[indx] := picture1.createPictureIndirect(true, false);

If you use the createPicture method in JADE thin client mode, the picture image would be created on the presentation client and brought back to the application server. Assigning the picture then causes the image to be sent back to the presentation client and to be cached, which could involve significant delays and overheads for a reasonable-size image.

Using the createPictureIndirect method, a small binary is sent instead and the image data itself is not transported between the presentation client and the application server.

Use of the createPictureIndirect method also means that actual image data cannot be accessed by using the picture property.