WinStudio
IWSIDOCollection interface
Retrieves a binary large object (BLOB), such as a graphic image, from a file and loads it into the currently active property of a collection.
object.ImportBlob( PropertyName, FileName )
Part |
Description |
object | Required. An expression that evaluates to the name of an IDO collection object. |
PropertyName | Required. The name of a Binary property in the collection. |
FileName | Required. The name of the file containing the BLOB. FileName must include the path. The path can be relative to the directory containing WinStudio.exe. |
The difference between this method and the ImportObjectPropertyAsBlob method is that this one imports the BLOB to the currently active object, and ImportObjectPropertyAsBlob imports the BLOB to an object from a specified (other) row.
This example imports a BLOB from a bitmap file named Splash.BMP into a property named Photo and then exports it to a temporary file named Splash_VBA_TEST.BMP.
Sub Main() Dim PropertyName As String Dim FileName As String PropertyName = "Photo" FileName = ".\res\Splash.BMP" ThisForm.PrimaryIDOCollection.ImportCurrentObjectPropertyAsBlob( PropertyName, FileName ) FileName = "C:\Temp\Splash_VBA_TEST.BMP" ThisForm.PrimaryIDOCollection.ExportCurrentObjectPropertyAsBlob( PropertyName, FileName ) End Sub