2
votes

I want to use the interactive gesture event for my windows application(for mouse and touch). Although OnGesture(Sender: TObject; const EventInfo: TGestureEventInfo; var Handled: Boolean); event is triggered, while zooming with two finger touch, I am always getting EventInfo.gestureId is 0. But I am getting the standard gestures. Note : I am using Delphi XE7 for development and windows 8.1 touch device for testing.

procedure TForm1.GISGesture(Sender: TObject; 
  const EventInfo: TGestureEventInfo; var Handled: Boolean);
begin 
    if (EventInfo.GestureID = igipan) or(EventInfo.GestureID = igiZoom)  then
    begin
      ShowMessage('zoom or pan');
    end;
end;

Here EventInfo.GestureID is 0 whenever I tried to zoom with two finger or pan.

1
If you're looking for those igiPan, igiZoom and igiRotate constants, add System.UITypes unit to the uses clause. If not, describe what you want, ask a question.TLama
Sorry @TLama for my unclear question,I am getting the events for standard gesture but not gettting the interactive gesture, While I am zooming with two finger, Ongesture event is triggered but the Eventinfo.gesture id is always 0.Ashis
You've not spent enough time asking the question. Please edit it (significantly) to explain in detail what you seek to achieve, what you've done, and how it fails. Please don't ask the question in comments.David Heffernan
Thee edit doesn't contain real code and isn't formatted properly. Please use the help in the edit window to sort out the formatting.David Heffernan

1 Answers

0
votes

On VCL gestures like are igZoom and igRotate are disabled by default so no events are fired for them.

You can enable them through Touch property of your component that should react to these gestures.

Gestures settings in Object Inspector