Returns a picture object created from a picture file.
[ppic =] LoadPicture ( sFilename )
The LoadPicture procedure syntax has the following parts:
Name |
Type |
Description |
ppic |
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 |
The file extension is used to determine the format. Supported file extensions are bmp, emf, wmf, jpg, png, gif, tif, and ico.
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