In order to display images, developers must first load the image into a DIB. See the Load an image into a DIB section for additional details. After loading the image, developers can display the DIB by setting the hDib property of the BIDisp.OCX to the handle of the DIB you want to display and then using the Refresh method to refresh the display. For example:
thisform.oBIDisp.hDib = hDib
thisform.oBIDisp.Refresh()
Don’t forget to use the DropDIB method to free up the memory when you have finished with the DIB.
Clearing an image displayed by the BIDISP control.
You can clear the image by setting the hDib property to 0 and refreshing the image:
BIDisp.hDib = 0
BIDisp.UpdateControl(0, 0, 0, 0)
As known bug in the code, after setting the BIDisp.hDib property to 0, BIDISP will continue to return the old value in BIDisp.hDib. Please do not use the value returned by BIDisp.hDib and store the currently set hDib value separately if you need it.