LoadPicture

Returns a picture object created from a picture file.

Syntax

[ppic =] LoadPicture ( sFilename )

The LoadPicture procedure syntax has the following parts:

 

Name

Type

Description

ppic

APicture

Returned picture object, Nothing if file format is not supported or the functions is not successful

sFilename

Val BString

Filename where the picture is created from

Comments

The file extension is used to determine the format. Supported file extensions are bmp, emf, wmf, jpg, png, gif, tif, and ico.

Example

The following example load a bitmap from a file and displays it in an image control:

ppic=LoadPicture("C:\\temp\\MyBitmap.bmp")

img.Picture=ppic

See Also

APicture, Image, SavePicture