ImageEn, unit iexOtherClasses

TIERFBClient.SendPointerEvent

TIERFBClient.SendPointerEvent


Declaration

procedure SendPointerEvent(x, y: integer; LeftButton: boolean; MiddleButton: boolean; RightButton: boolean);


Description

Communicates a new mouse pointer position and mouse buttons state to the server.
SendPointerEvent also updates the frame buffer drawing the mouse cursor, so you should refresh the screen just after.

May throw EIERFBError exception if a communication error occurs.

Parameter Description
x Horizontal coordinate of the mouse (hotspot), relative to the frame buffer
y Vertical coordinate of the mouse (hotspot), relative to the frame buffer.
LeftButton True if the left button is down
MiddleButton True if the middle button is down
RightButton True if the right button is down


Example

procedure TForm1.ImageEnViewMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  if RFB.Connected then
  begin
    RFB.SendPointerEvent(ImageEnView.XScr2Bmp(X), ImageEnView.YScr2Bmp(Y), ssLeft in Shift, ssMiddle in Shift, ssRight in Shift);
    ImageEnView.Update;
  end;
end;