Q: How can I select an image area with the mouse on the BiDisp.ocx control?
A: If you want to select a region on an image and retrieve the coordinates of the selected rectangle, you can use the SelectImageArea property of BiDisp.ocx control. If you set the SelectImageArea property to TRUE, you can draw a rectangle on the image. If you release the left mouse button the SelectImgArea event will be sent to the application. The event sends the coordinates of the selected rectangle.
Code example:
Private Sub BiDisp_SelectImgArea(ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long)
…
MsgBox “The selected image area: “ + CStr(Top) + “ “ + CStr(Left) + “ “ + _
CStr(Rigth) + “ “ + CStr(Bottom) + “.”
…
MDIForm1.ActiveForm.BiDisp.SelectImageArea = 0
End Sub