Infosys Microsoft Alliance and Solutions blog

« Death by Silverlight | Main | Windows 7 in a server 2008 environment – the best choice for branch administration »

Win 7 - Touch

Few weeks back we got access to HP's Touch Smart laptop with Win 7 and that was our first real exposure to working with Touch. Touch isn't something of a science fiction anymore and most new mobile devices support touch capabilities, though not necessarily multi-touch. Microsoft Surface  was a very interesting innovation in this space, but was limited to some extent on its usage due to factors like restricted availability of surface table, its cost, and it being horizontal and hence not suitable for many business applications.

Windows 7 now natively supports multi-touch and if you have the right hardware like HP touch smart laptop, you can start to program some real cool applications. When I first read about WPF 4.0 will support touch at framework level, I wasn't sure what it meant and hence I decided to spend some time understanding this a bit more. Here I am not going deep into any of these aspects, but just want to highlight a few important aspects of touch and how to program for it.

The first question really is what is multi-touch and how is this different from say the stylus based Tablet PCs. Simplistically put, multi-touch literally means ability to handle multiple touch points at the same time. So if you can put more than 1 finger on the device, it is able to recognize all of them and provide these via relevant APIs for programmatic manipulation. To add to this will be ability to recognize gestures like pan, zoom, rotate etc and again providing suitable API backing for applications to program against them.

The next question that needs some digging into is, do I really need to handle any specific messages/API? When I run existing applications on Win 7 touch device, I am able to get basic manipulation working without having done anything. The point to understand here is that the underlying drivers and OS do provide for touch specific information, but since many applications (or rather almost all applications as of today) aren't touch aware, they still need to be responsive in some sense. Hence the touch messages are eventually promoted as regular mouse messages. It is due to this behavior that most applications will continue to work without any specific handling of touch. However the response may not be very good and at times seem jerky. Also you may end up with unwanted behavior like in one of our apps, we had a touch and move behavior, but while moving, the finger would go over another control and it would react even though it wasn't supposed to. The mouse event promotion probably triggered the other control to also react.

To address this an important aspect is ability the suspend mouse event promotion. The high level behavior hence will be to capture touch down event, suspend mouse event promotion, continue to handle touch related events to provide for pan, zoom, flip, rotate etc and finally handle touch up to revert to normal behavior. In our application we did this and we had much better touch response from the application (apart from the hardware issues where the touch calibration will frequently go out of synch).

Applications like IE 8 and Paint are already touch aware and if using them on Win 7 with touch hardware, you can play around with them. IE will allow zoom in-out of content via touch and paint will allow you to draw with multiple fingers. To know more about touch support, check these links

  1. Windows Touch
  2. Touch support in Silverlight

Finally, one last aspect is do I need to do something different when designing for touch aware applications. One answer to this is already discussed in previous question in terms of WM_TOUCH message handling. Some of the other aspects are to create larger controls so that touching is easier and the application can better respond to it. Also note certain behaviors will also have to change like you can no longer program for mouse hover and tooltip kind of user experience as these won't work well with touch interface. When using stylus, it does offer proximity sensor and when it is close to the screen, it can behave like mouse hover, but not with regular touch. You can check out more design guidance on touch applications here. Another document of interest will be How to Design and Test Multitouch Hardware Solutions for Windows 7.

The various links that I have provided above should help you get started on touch journey. There is also an interesting session from PDC 2009 on Windows Touch Deep Dive. However note that this talks at low level details and raw windows API and programming and isn't really talking about managed programming.

Hope you will find this interesting and would like to get started with touch interface is not already doing that. I would like to hear from you in terms of would you consider touch in your applications and what kind of applications would they be?


This is fabulous Atul. The Win 7 - Touch is bound to create whole lot of new user experience. With more and more applications built to leverage this feature, it will create a sort of new revolution in the ways we now use the laptops and computers. I was thrilled to see that both teenagers and kids in 3-5 years age bracket could effortlessly interact with the applications using 'Touch'... this was more of expected. However, the people in senior age group who were not comfortable with mouse and keyboards have now got a new tool in their hands which they find very comfortable. I guess, this is one feature they had been longing for so long... a mouse attached on their fingers :-)

Cool Atul, In fact had been doing lot of POCs around gestures and touch in recent times.

One thing that does ring a bell is that the technologies seem to overtake the present mutitouch paradigm, I was going through the sixth sense device demo,
Need to see if this is a point of inflexion on a downward concave for surface or they converge...

Thanks Rajesh and Venkatesh for your comments. Yes, I do believe that Touch experience will revolutionise the way we interact with computers these days. The sixth sense talk is very interesting and I am keen to see how soon we will start to see this technology come out of research labs and into main stream.

That said, my thinking is also that the initial apps that will probably get onto touch will be more where we deal with read only information or with little editing, unless the editing is like gesture driven. True typing like requirements may take longer to get onto touch.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter