Extending this to touch gestures of touchpad in laptop

Jan 16, 2012 at 1:00 PM

Hey frnds, 

                  I have an application in which i need to simulate mouse movements, clicks and in addition touch gestures of a touchpad of laptop such as pinch-zoom in/out and scroll gestures. Does anyone have ideas to do this.

                I think as Dell (in my case) drivers were needed on top of windows 7 ( in my case) to enable this touch gestures, do i need to access their functions.

               Can anyone please throw some light on this...

 

 

Mar 4, 2013 at 10:03 AM
Hi Aditya,

i am finding same thing. if you got any answer than please help me. I want to capture touch events in surface machine.
    private void button1_Click(object sender, EventArgs e)//Start hook
    {
        InitializeSurfaceInput();
    }
     private void InitializeSurfaceInput() 
    {
            // Create a target for surface input.
        touchTarget = new TouchTarget(IntPtr.Zero, EventThreadChoice.OnBackgroundThread);
        touchTarget.EnableInput();

        touchTarget.TouchDown += new EventHandler<TouchEventArgs>(touchTarget_TouchDown);
        touchTarget.TouchMove += new EventHandler<TouchEventArgs>(touchTarget_TouchMove);
    }

    void touchTarget_TouchMove(object sender, TouchEventArgs e)
    {
        Console.WriteLine(e.ToString());
    }

    void touchTarget_TouchDown(object sender, TouchEventArgs e)
    {

        Console.WriteLine(e.ToString());

    }

    public TouchTarget touchTarget { get; set; }

    private void button2_Click(object sender, EventArgs e) //Stop Hook
    {
        touchTarget.TouchDown -= new EventHandler<TouchEventArgs>(touchTarget_TouchDown);
    }