MouseMove
Top  Previous  Next

Description

This event is fired each time the mouse has moved inside the control window. Returns the coordinates of a pixel pointed by the cursor.


Syntax


[VB]
Private Sub objActiveDcam_MouseMove( ByVal X As Integer, ByVal Y As Integer )


[C/C++]
HRESULT Fire_MouseMove( SHORT X, SHORT Y );


Data Types
[VB]

X: Integer
Y: Integer

Parameters
[C/C++]

X [in]  
The X-coordinate of the pixel pointed by the cursor.  
Y [in]  
The Y-coordinate of the pixel pointed by the cursor.  
   

Return Values


S_OK  
Success  
E_FAIL  
Failure.  

Example


This VB example uses the MouseMove event to display the value of the pixel pointed by the cursor:

Private Sub ActiveDcam1_MouseMove(ByVal X As IntegerByVal Y As Integer)  
   
   Dim
 Value 
As Integer

      Value = ActiveDcam1.GetPixel(X, Y)
Label1.Caption = Value  
End Sub  
 

Remarks


Note that the coordinates returned by this event refer to the image coordinate system, not to the screen coordinates.

Set the Acquire and ScrollBars properties to TRUE in order to display a scrollable live video and get a visual access to all parts of the image.