Xbasic

UI_BITMAP_CREATE_FROM_SCREEN Function

Syntax

Result_Flag as L = UI_BITMAP_CREATE_FROM_SCREEN(C name, N x, N y, N width, N height)

Arguments

nameCharacter

The name of the bitmap to create.

xNumeric

The horizontal coordinate of the upper left corner of the image.

yNumeric

The vertical coordinate of the upper left corner of the image.

widthNumeric

The width of the image to capture.

heightNumeric

The height of the image to capture.

Returns

Result_FlagLogical

Returns .t. if the operation succeeds, otherwise .f.

Description

UI_BITMAP_CREATE_FROM_SCREEN() creates a bitmap from the screen. All measurements are in inches.

Discussion

Creates a bitmap image by capturing what is currently displayed on screen.

This function cannot be run in a background thread. Threads cannot interact with the user interface.

Example

The following example captured a 4 by 2 inch rectangle from the upper left corner of the Code Editor.

images/GR_ui_bitmap_create_from_screen.gif
ui_bitmap_create_from_screen("test", 0, 0, 4, 2)
ui_dlg_box("image", <<%dlg%
{image=test}
%dlg%)

Limitations

Desktop applications only. Cannot be run in a background thread.

See Also