Image Type Field Control with DataBinding Capability
Version Compatibility: Visual Basic 5
The control can be bound to an ADO control/Data Environment with the PhotoField property as the binding property.
The control has a default property Photofield which can be used to hold data from a image field in a ADO recordset. For example, if you have an instance of the DBImage on a form named as DBImage1 and rs as a open recordset containing the image field 'Photo', then you can use :
' DBImage1.PhotoField = rs("Photo") -
'
' This will populate the control and display the image
' rs("Photo") = DBIMage1.PhototField -
' This will update the Image field from the image
' stored in the Control
You can load a image file into the component using its LoadImage method which is similar to the LoadPicture method of Image/Picture Control.
The Control also exposes a context menu which can be enabled by the RightClickMenu property
More details about the control's usage are contained within the code's comments.
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.
Download dbimage.zip