TouchInjection on Windows 8 with C#

The TouchInjection API is originally available to C++ applications, but with the TCD.System.TouchInjection package, it can also be used in C# applications. This sample shows how to inject pinch/zoom gestures.

C# (106.6 KB)
 
 
 
 
 
5 Star
(2)
948 times
Add to favorites
11/13/2014
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • InjectTouchInput error
    2 Posts | Last post March 09, 2015
    • After InjectTouchInput, It return false and when I checked GetLastError(), It return 87(Invalid Parameter). What should I do to solve this problem? this is my code. DrawHand function is called when caputured hands by Kinect sensor. Please help
      
      http://pastebin.com/afweJ3WB
    • I solved this problem. First I deleted parameter of InitializeInjection(). And to solve error code 87 when I make touch and move event I made DOWN / INRANGE / INCONTACT event before make event of UPDATE / INRANGE / INCONTACT.
  • Neither zoom nor pinch are working. Why?
    2 Posts | Last post January 13, 2014
    • I ran the program in admin mode. I opened 3 different programs
      1)Google Earth, 2)A page on chrome, 3) a Paint window.
      
      1 and 2 dont respond. I can see the virtual touch happening where the contact points flash
      and then move outwards or inwards but the programs themselves dont respond.
      When I use my mousepad on my laptop (I dont have a touchscreen) I can use zooming and pinching ...
      
      Paint responds to the touch injection by showing me two lines being drawn simultaneously.
      This is proof that the touch is being injected as two fingers dragging. So my question is then why is it not being recognized by the other programs as pinch\zoom?
      
      How can I inject pinch and zoom gestures? 
      
      
      
    • Hi twerdster,
      
      It looks like the injection of the touch input is perfectly fine, because Paint (and I suppose the Windows 8 start screen too) perfectly respond to the events.
      
      The lack of pinch-to-zoom support seems to be Chromes fault. Take a look at this solution, maybe it works for you: http://www.eightforums.com/tablet-touch/32924-chrome-touchscreen-enabled-windows-8-a-2.html#post302466
      I suspect the same behavior can be expected in Google Earth.
      
      As you wrote yourself - Paint responds, so the touch injection works.
      
      cheers