loadPicture

loadPicture(fileName: String): Binary updating;

The loadPicture method of the Application class loads a picture (icon, bitmap, JPEG, meta, PNG, TIFF, or GIF file) from an external picture file specified in the fileName parameter.

This method returns an object of type Binary, which is examined to ensure that it is a valid picture file. If the fileName parameter is not specified, a null image (that is, no picture) is returned.

The following example shows the use of the loadPicture method.

vars
    graphic : String;
begin
    graphic := "apict.bmp";
    icon := app.loadPicture("c:\my.icon");            // set form icon
    pictureIcon.picture := app.loadPicture(graphic);  // set picture
end;