Xbasic

UI_SHOW_IMAGE Function

Syntax

C ui_show_image(C filename [,C title [,N x [,N y [,C style ]]]])

Arguments

filename

The name of the Windows Bitmap (.BMP) or JPEG (.JPG) image to display. If the filename is blank, Alpha Anywhere will prompt for a filename.

title

Optional. The title of the dialog box.

x

Optional. Default = 4 inches. The width of the dialog box.

y

Optional. Default = 4 inches. The height of the dialog box.

style

Optional. "Best Fit", "Stretch", "Absolute"

Description

The UI_SHOW_IMAGE() function displays a pop-up dialog displaying a Windows Bitmap (.BMP) or JPEG (.JPG) image. If filename is null, A5 prompts. Stype is 'Best Fit', 'Absolute' or 'Stretch'

Example

Best fit preserves the aspect ratio of the image, but scales it to fit the dialog box.

images/GR_best_fit.gif
UI_SHOW_IMAGE("c:\documents\Xbasic Reference\images\aaa.bmp", "Dumbell Nebula", 4, 2, "Best Fit")

Absolute preserves the image resolution and shows as much of it as will fit.

images/GR_absolute.gif
UI_SHOW_IMAGE("c:\documents\Xbasic Reference\images\aaa.bmp", "Dumbell Nebula", 4, 2, "Absolute")

Stretch scales the image without regard to its aspect ratio to completely fit the dialog box window.

images/GR_stretch.gif
UI_SHOW_IMAGE("c:\documents\Xbasic

Reference\images\aaa.bmp", "Dumbell Nebula", 4, 2, "Stretch")

Limitations

Desktop applications only.

See Also