TVideoGrabber.OnMouseMove

Prev

Next

TVideoGrabber

Events

 




































































































Occurs when the user moves the mouse pointer while the mouse pointer is over a control.


Declaration
property OnMouseMove: TOnVideoMouseMove read FOnMouseMove write FOnMouseMove;


__property TOnVideoMouseMove OnMouseMove=read=FOnMouseMove, write=FOnMouseMove


Event OnMouseMove(VideoWindow As Long, x As Long, y As Long)

Description


- if TranslateMouseCoordinates is enabled:
this event returns the video frame coordinates corresponding to the native video size. Therefore the event does not occur if the mouse is moved out of the video window.

- if TranslateMouseCoordinates is disabled:
the normal OnMouseUp event occurs and returns the usual mouse coordinates over the video window, as well as out of the video window if the mouse has been clicked within the video window and then moved out of it.

The difference appears when Display_AutoSize is disabled or PreviewZoomSize <> 100. In this case, the event reports the corresponding native video source coordinate, necessary to draw objects over video frames from the OnFrameBitmap event.
Note that the BitmapInfo parameter of the OnFrameBitmap event returns directly the current mouse information.

Note: to detect if the video is displayed when the event occurs, test VideoWindow <> -1.
E.g.:

procedure TfrmMainForm.VideoGrabberMouseMove(Sender: TObject;
  VideoWindow: Integer; Shift: TShiftState; X, Y: Integer);
begin
   if VideoWindow <> -1 then begin // if the video is displayed
      if chkFreeHandEnabled.Checked then begin
         ...
         ...
      end;
   end;
end;


See Also
TCardinalDirection TOnFrameOverlayUsingDC TOnFrameOverlayUsingDIB TTextOverlayAlign AdjustOverlayAspectRatio DrawBitmapOverFrame GetFrameInfoString ImageOverlay_StretchToVideoSize MouseWheelEventEnabled OnFrameBitmap OnFrameBitmapEventSynchrone OnFrameOverlayUsingDC OnFrameOverlayUsingDIB OnFrameOverlayUsingVIDEOHDR OnMouseDown OnMouseUp OnMouseWheel OverlayAfterTransform RefreshPlayerOverlays SetImageOverlay_AlphaBlend SetImageOverlay_AlphaBlendValue SetImageOverlay_ChromaKey SetImageOverlay_ChromaKeyLeewayPercent SetImageOverlay_ChromaKeyRGBColor SetImageOverlay_Enabled SetImageOverlay_Height SetImageOverlay_LeftLocation SetImageOverlay_RotationAngle SetImageOverlay_StretchToVideoSize SetImageOverlay_TargetDisplay SetImageOverlay_TopLocation SetImageOverlay_Transparent SetImageOverlay_TransparentColorValue SetImageOverlay_UseTransparentColor SetImageOverlay_Width SetImageOverlayFromBMPFile SetImageOverlayFromHBitmap SetImageOverlayFromHBitmap2 SetImageOverlayFromImageFile SetImageOverlayFromImageFile2 SetImageOverlayFromJPEGFile SetImageOverlayFromTBitmap SetImageOverlayFromTBitmap2 SetImageOverlayFromTImage SetImageOverlayFromTImage2 SetTextOverlay_Align SetTextOverlay_BkColor SetTextOverlay_CustomVar SetTextOverlay_Enabled SetTextOverlay_Font SetTextOverlay_FontColor SetTextOverlay_GradientColor SetTextOverlay_GradientMode SetTextOverlay_HighResFont SetTextOverlay_Left SetTextOverlay_Right SetTextOverlay_Scrolling SetTextOverlay_ScrollingSpeed SetTextOverlay_Shadow SetTextOverlay_ShadowColor SetTextOverlay_ShadowDirection SetTextOverlay_String SetTextOverlay_TargetDisplay SetTextOverlay_Top SetTextOverlay_Transparent ShapeOverlay ShapeOverlayEnabled ShapeOverlayList TextOverlay_Align TextOverlay_BkColor TextOverlay_CreateCustomFont TextOverlay_CreateCustomFont2 TextOverlay_Enabled TextOverlay_Font TextOverlay_FontColor TextOverlay_Left TextOverlay_Right TextOverlay_Scrolling TextOverlay_ScrollingSpeed TextOverlay_Selector TextOverlay_Shadow TextOverlay_ShadowColor TextOverlay_ShadowDirection TextOverlay_String TextOverlay_Top TextOverlay_Transparent TranslateMouseCoordinates