Gets the picture object of an image file. An image file is either one of the following:
- Bitmap
- Icon
- Metafile
Syntax:
Returns
If the contents of the file is either a bitmap, an icon or a metafile then an IPictureDisp object is returned of the image; otherwise an empty object or NULL is returned.
Remarks
The IPictureDisp is an OLE-Automation object that provides a subset of functionality from the IPicture interface.
Example
Dim oEdiDoc As Fredi.ediDocument
Dim oFileSystem As Fredi.ediFileSystem
Dim oFile As Fredi.ediFile
Dim oImage As IPictureDisp
Dim sGifFile As String
sGifFile = App.Path & "\rhino.gif" ' GIF (image) file
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Get file system object.
Set oFileSystem = oEdiDoc.GetFileSystem
' Get file object that is an image.
Set oFile = oFileSystem.GetFile(sGifFile)
' Interrogate the Image property.
Set oImage = oFile.Image
If oImage Is Nothing Then
MsgBox sGifFile & " file is not an image"Else
MsgBox sGifFile & " file is an image"End If
Samples