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.
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.