in Silverlight

Step by Step Tutorial : Installing Multi-Touch Simulator for Silverlight Phone 7

First of all, I would like to say thank you to Davide Zordan, Stefan Wick, Jonas Follesø and Laurent Bugnion for helping me to get this post out. It took me quite a few days since I was facing a lot of problems.  Now, it’s working in my machine and I like to share this with you all.

This post is written for those who don’t have touch device but want to develop multi-touch Silverlight application for Windows Phone 7. If you prefer to watch the screen-cast created by the original developer of Multi-touch Vista, you can watch it here. But as there is no audio and the way that he presented is a bit fast for the most of viewers, I decided to write the step-by-step tutorial based on his screen-cast. I give the full credit to the original developer of Multi-touch Vista. He has done very good job.

1. Software

You will need the software below before you start playing with Silverlight for Phone 7.

2. Download Multi-Touch Vista

Once you have installed the required software above, you need to download Multi-touch Vista from codeplex. We will be using Multi-touch Vista as a multi-touch simulator in this article. There are a lot of things that Multi-touch Vista can do but we will use it as a touch simulator only. The following is what the author of Multi-touch Vista wrote about his project. I’m just doing copy-paste the description here just in case you are interested to read. :)

Multi-Touch Vista is a user input management layer that handles input from various devices (touchlib, multiple mice, TUIO etc.) and normalises it against the scale and rotation of the target window. Now with multitouch driver for Windows 7.

2. Installing the driver

  • Extract the zip file
  • Open the Command line with administrator right (Note: This is very important step. Otherwise, you will get this error “devcon failed.” )
  • Go to the folder that you have extracted the file
  • Go to Driver folder
  • Go to x64 or 32 based on your system configuration (In my case, I’m using 64 bits computer so I will go to x64 folder. )
  • Then, you will see one bat file called Install driver.cmd
  • Type “Install driver.cmd” and press Enter key as shown in picture.

  • You will get the dialog below asking whether you want to install this device software or not. Please click on “Install” button

  • If the installation is completed, you will see the message as below in command line. Then, you can close that cmd now.

3. Device Manager

  • Now, it’s time to open the device manager. You can open the device manager from control panel but I will do with short-cut way.
  • Type “device manager” without double quote in Window Search Bar and hit Enter Key

  • Now you will see the Device Manager as below. Go to “Human Interface Devices”

  • Right-click on “Universal Software HID device”
  • And choose “Disable” to disable the device

  • You will get the confirmation before disabling the device.
  • Just say “Yes”

  • After that, re-enable this device again.
  • Right-click again on this node and choose “Enable”

4. Pen and Touch

  • Please type “pen and touch” without double quotes in Windows Search Bar. (Note: If you have managed to complete the step #3 property, you should be able to open “pen and touch” dialog. If you don’t get any dialog then please go thru the step #3 again. )

  • You will get the “Pen and Touch” dialog as below. Go to “Touch” tab and tick on “Show the touch pointer when I’m interacting with itmes on the screen.”

5. Creating Silverlight Phone Application

  • OR you can download my sample that I created from this link.

Once you have downloaded the sample, please open it in VS 2010 and build it. Please ensure that you are able to compile it successfully. After that, we need to run the Multi-touch Vista to simulate the touch input for our application.

6. Running Multi-touch Simulator

  • Connect another mouse device in USB port.
  • Run Multitouch.Service.Console.exe

  • One console window will be opened as below. And you will see two touch pointers

  • Run Multitouch.Driver.Console.exe (You will get another console window. )
  • Run Multitouch.Configuration.WPF.exe
  • Click on “Configure” to block the cursor

The system cursor is no longer available after that. But as you already have two mouse devices, you can move those “red” touch pointers by using your mouse. Each “red” touch pointer represents each USB mouse that you connected to your computer.

Let’s open Microsoft Paint and draw two lines simultaneously by using two mice. Here is what I have done. (My wife gave me weird look when I’m using two mice in one computer. :) ) Please try yourself and have fun.

  • Okay. Let’s go back to Visual Studio that we opened it earlier
  • Run it (it will take a while to load the emulator. You will see the screen below once it’s loaded. )

  • Move one “red” touch pointers on blue rectangle
  • Press it and move it around. You should be able to move that rectangle with your mouse.
  • Move two “red” touch pointers on blue rectangle
  • Press both left buttons of both mice. Drag one up and another one down slowly.  (You will see that the rectangle will be a bit longer as below. )

Note that the scaling is not really smooth right now. I will have to work on that. But I’m glad that I’m able to test it with multi-touch simulator without buying real touch device. Anyway, if you can afford to get a real touch device, I would recommend you to get it.

Happy Silverlighting!! :)

Leave a Reply

52 Comments

  1. Thanks for the mention, and for a great writeup :)

    It’s a cool little trick to get started with multi touch. Hopefully there will be plenty of reasonable priced multi touch monitors available.

    – Jonas

  2. Hi I’ve been trying to do the Step by Step Tutorial : Installing Multi-Touch Simulator for Silverlight Phone 7 but I cant do step 2 it just doesnt work and i dont know how to do it. Is there any think you know that might help me. Thanks

  3. Hi,
    Evrything is ok but no click possible, I’m on Windows Vista Family Edition Premium SP1???

  4. You said you installed this on 64 bit but I get a driver not signed message and the device manager shows its not installed correctly

  5. I’m with Mal, windows 7 refuses to run the driver as it is unsigned, is there any way round this? thanks for the good tutorial though

  6. 4. Pen and Touch
    Please type “pen and touch” …

    There is another way to do this?
    My Windows language version is not in english.

  7. Is there any quick way to set this up for TUIO instead of MultipleMic? I rather start a batch that does all that for me for TUIO then use two mice.
    (using the iPAD as the input device)

  8. I got a message saying ‘the driver is not digitally signed’ therefore I can’t get any pen and touch option in the windows search bar.

    What should I do then?

  9. ahhh sorry. I just read the multitouch vista website thoroughly and found out that I had to replace the 64-bit driver from the one on the download page instead using the archived ones.

  10. I cant click on “Show the touch pointer when I’m interacting with itmes on the screen.” after following through. Not quite sure if its installed properly though since the 2nd cmd window which opens after “install driver.cmd” closes automatically after a while. No message on the 1st cmd window

  11. Noticed two bugs:

    Red dots don’t go over context menus, and you aren’t supporting multiple monitors with the desktop stretched across (the red dot is way off).

  12. Thanks for this great project.

    One problem: The click point of the goes astray when using multiple monitors. It seems like it’s using the tota width of the desktop but only using one monitor ?

  13. Hi, I installed it on Windows 7 64bit. It works fine, but I can’t click. How can I solve this?

  14. Hi…. I tried to do the step by step tutorial. Everthing works fine until I open MS paint. I cant paint, becuase my two “touch-mouses” cannot click. Is the .Net 4 Framework required? Thanks

  15. what should we do if we just have one mouse ?
    My computer can just support one mouse .

  16. yeah, looks great.
    however when i trie to isnatll it in Vista (x32), I was unable to isnatll the driver at all. first of all it shows Security warning and when i allows to Run , it simply displays nothing.

    After that i was restarted my system , and it was keep asking for driver location…. when i entered path to downloaded folder, it was unable to locate driver, also i tried the x32, Driver… and other paths.

    I am curious to know what i did wrong because i am unable to complete first step only.

  17. hi,
    Evrything is ok but no click possible and my system is Win7 ultimate? can u help me?

  18. great writeup!!
    I was able to make it work but there is an offset i experience i.e. while I was trying on a paint, it does not directly draw where the red dots are rather a bit farther from the red dots. I can see your drawing is clearly following the red dots in the paint.
    Any idea on that?

  19. So I’m trying to get this to work and gone through all of the steps. Got two beautiful mouse-cursors moving around but no touches are registred. Is there an “enable win7 touch input” that I’ve missed anywhere?

  20. I use win7 x64 but no click as well as no mouseLeftButtonDown is recognized after i click the checkbox for blocking the native windows cursor.
    This is the case for both paint, the windows gui or the winphone emulator.
    I see the two red spots move as supposed to, but nothing reacts on them.

  21. Hi Sravan,

    Do you mean that you want this post as a PDF doc? If yes then you can use online converter tool.. let me know if you have problem in converting.

  22. “I use win7 x64 but no click as well as no mouseLeftButtonDown is recognized after i click the checkbox for blocking the native windows cursor.
    This is the case for both paint, the windows gui or the winphone emulator.
    I see the two red spots move as supposed to, but nothing reacts on them.”

    Same problem on W7 64 bit…
    Did you find a way out?

  23. After i run the Run Multitouch.Service.Console.exe, i have seen two touch cursors,but somehow both is not able to do clicking function anymore,and i can’t continue after that.

  24. Hi,

    I’ve done all steps. I can see the red dots, but when i open paint.exe and try to paint, only one mouse is working (first clicked) (not concurrent/multitouch drawing from both mouses).
    Any ideas

  25. Hi Michael,

    I went in a little problem.
    I followed every ste in part 2 to install the driver, but when it comes to “Install driver.cmd” i get “The Install command is either misspelled or could not be found”.
    Have You any clou what I’m doing wrong?

  26. To make it click you have to run fisrt:

    1) Multitouch.Service.Console
    2) Multitouch.Driver.Console
    3) Multitouch.Configuration.WPF

    Hope it helps

  27. Hi,

    everything works up to the point I click on configure in the multitouch configuration. This causes a crash and stops the multitouch service. I’ve never got as far as disabling the windows mouse…..

    Running Win7 x64 ultimate

    Any ideas?

  28. “Hi, you.
    I have a problem when i try to do like your tutorial.
    This link is error picture: https://lh6.googleusercontent.com/-ddRFsFJQb7M/TiJPJqURwhI/AAAAAAAAAHY/wS67QOSaqqk/Capture.PNG

    I install Install driver.cmd successful, run Multitouch.Driver.Console.exe, Multitouch.Service.Console.exe and Multitouch.Configuration.WPF.exe.
    But checkbox in Pen and Touch has not enable.
    Can you help me? Thank very much.”

    “I use win7 x64 but no click as well as no mouseLeftButtonDown is recognized after i click the checkbox for blocking the native windows cursor.
    This is the case for both paint, the windows gui or the winphone emulator.
    I see the two red spots move as supposed to, but nothing reacts on them.”

    Also for me

  29. I am not able to install driver. It says Devcon failed. Please suggest.

  30. You have to be running CMD prompt in administrator mode.

  31. fyi for some you’ll need to type Install driver.cmd in quotes like so “Install driver.cmd”

  32. It’s not working. I’m getting 2 dots but I can only move them. No clicks are working.

  33. still get “devcon failed”… I am logged with Administrator type account. Windows 7 64 Bit.
    help

  34. Yes. That did the trick. I found if I type CMD into the Windows Start, and than press Ctrl-Shift Enter – it will prompt for to allow the command prompt access to the system.

    Thank’s for the follow up.