checkPictureFile(fileName: String): Integer;
The checkPictureFile method of the Application class checks the contents of the file specified in the fileName parameter to determine whether it contains a valid picture image.
In JADE thin client mode, this method always refers to a file on the presentation client.
The return values from this method are listed in the following table.
|
|
Integer | Picture Type |
|---|---|---|
| PictureType_None | 0 | Not a valid picture |
| PictureType_Bitmap | 1 | Bitmap |
| 2 | Not used | |
| PictureType_Icon | 3 | Icon |
| PictureType_MetaFile | 4 | Metafile |
| PictureType_Cursor | 5 | Cursor |
| PictureType_Tiff | 6 | Tag Image File Format (.tif file) |
| PictureType_Jpeg | 7 | Joint Photographic Experts Group (JPEG) |
| PictureType_Jpeg2000 | 10 | Joint Photographic Experts Group (JPEG 2000) |
| PictureType_Png | 8 | Portable Network Graphics (png) |
| PictureType_Gif | 9 | Graphics Interchange Format (.gif file) |
The following example shows the use of the checkPictureFile method.
vars
helix : String;
icon : Binary;
begin
helix := " c:\jade\bin\Jade.bmp";
if app.checkPictureFile(helix) = Window.PictureType_Bitmap then
icon := app.loadPicture(helix);
write icon.display;
endif;
end;