kinectv2 to control the mouse
<p>I use kinectv2 to control the mouse with hand gesture in windows store app.(When the right hand is closed,the mouse click).I use the mouse_event and SentInput methods. But It doesn't work. My OS is windows 10 education.When I perform the project on OS windows 8.1,It works. Why?      </p>

<pre><code>    [DllImport("user32.dll")]
    public static extern bool SetCursorPos(int X, int Y);
    [DllImport("user32.dll")]
    static extern void mouse_event(MouseEventFlag flags, int dx, int dy, uint data, UIntPtr extraInfo);
    [Flags]
    enum MouseEventFlag : uint
    {
        Move = 0x0001,
        LeftDown = 0x0002,
        LeftUp = 0x0004,
        RightDown = 0x0008,
        RightUp = 0x0010,
        MiddleDown = 0x0020,
        MiddleUp = 0x0040,
        XDown = 0x0080,
        XUp = 0x0100,
        Wheel = 0x0800,
        VirtualDesk = 0x4000,
        Absolute = 0x8000
    }


   private void UpdateBody(Body body, int bodyIndex)
    {
        coordinateMapper = this.kinectSensor.CoordinateMapper;
        foreach (var jointType in body.Joints.Keys)
        {
            CameraSpacePoint position = body.Joints[jointType].Position;
            if (position.Z &lt; 0)
            {
                position.Z = InferredZPositionClamp;
            }
            DepthSpacePoint depthSpacePoint = coordinateMapper.MapCameraPointToDepthSpace(position);
            handCoordinate[0] = depthSpacePoint.X;
            handCoordinate[1] = depthSpacePoint.Y;

            if (jointType == JointType.HandRight)
            {
                if (!Double.IsInfinity(depthSpacePoint.X) &amp;&amp; !Double.IsInfinity(depthSpacePoint.Y))
                {
                    SetHandElipse(handPoint, depthSpacePoint.X, depthSpacePoint.Y);
                    //mouse_event(MouseEventFlag.Move | MouseEventFlag.Absolute, (int)depthSpacePoint.X*100, (int)depthSpacePoint.Y*100, 0, UIntPtr.Zero);
                    SetCursorPos((int)depthSpacePoint.X,(int)depthSpacePoint.Y);//move the mouse
                    System.Threading.Tasks.Task.Delay(500);
                    if (body.HandRightState == HandState.Closed&amp;&amp;mark)
                    {
                        mouse_event(MouseEventFlag.LeftDown | MouseEventFlag.LeftUp, 0, 0, 0, UIntPtr.Zero);//click
                        Task.Delay(TimeSpan.FromSeconds(1));
                        mark = false;
                    }
                }

            }
        }
    }
</code></pre>