If you haven't done so yet, you need to install the beta nextwin drivers. Without these, the TouchSmart will not show up as a multi input device when you make the call to GetSystemMetrics. As for creating a multitouch app, you can use pinvoke or you can use the stylus events until the 3.5 update or the 4.0 release of the .NET framework.
Hello guys,
I'm new to here, and I have an interesting thing I would like to achieve using a Touchsmart device.
After installing Windows 7 and enabling touch hardware on it, I would like to build a native WPF application, without using provided TouchSmart application from HP.
as shown on slide for this PDC it is possible to do such a thing, and I wonder how this can be achieved; can you please give a hand on this ?

Thanks in advance,
Ben.
Thanks JoeS for your quick answer, however I am not really used to develop using PInvoke nor stylus events, are there any examples arround on these?
Is having 3.5 SP1 installed is sufficient to use PInvoke or these stylus events?
Thanks for your help,
Ben.
The stylus events are supported on the WPF controls directly. See:
http://msdn.microsoft.com/en-us/library/system.windows.input.stylus_events(VS...
-Joe
Thanks a lot Joe again for ouyr answer, is it easy to determine two fingers gestures with these events, as the screen is at least dual touch?
From my understanding the Stylus support is limited to gestures. I believe you would use the GetStylusPoints method on the eventargs. My experience has been with pinvoke because I know moving forward it will be easier to update. For a more detailed answer, you might want to ask over in the MSDN forums where someone from Microsoft will be able to answer your question specifically. I also do not know what kind of support the stylus events will have with multitouch moving forward, if any, or if it is just a hack for now to let people play around. I'd be careful pinning an architecture to those events though.
Ok thanks a lot for your help again Joe, I'll try to have a look over there.
Cheers, Ben.
Just for others information I found this googling a bit, a guy has already done here the use of Win32 APIs, plus the integration of a gesture recognition porting a javascript library to C#
Good information so far.
Once .net framework v4 gets released as a CTP or BETA, it has assemblies that will handle multitouch much easier within WPF. In particular, the following libraries are what are going to be needed:
System.Windows.Touchpoint
System.Windows.TouchPointCollection
System.Windows.TouchDevice
This is ultimately how we'll be doing managed code applications in Win 7 that support multitouch.
Unfortunately, until the CTP/BETA comes out, we're pretty much stuck with non managed hacks like those above (which will work, but are a little more involved from a programming perpective).
In-case you haven't seen it, there's a poster of the upcoming .net 4.0 framework you can print out here:
http://blogs.msdn.com/brada/archive/2008/10/29/net-framework-4-poster.aspx
and a great video introduction to Multitouch development in Windows 7 from the Microsoft PDC here:
https://sessions.microsoftpdc.com/public/timeline.aspx (search for PC03)
Coming later, the Microsoft Surface platform is going to be incorporated into the framework, so we'll be able to use some of that functionality as well for non surface devices (and programming for Surface is very neat!)
PDC video on programming for current Microsoft Surface SDK here:
https://sessions.microsoftpdc.com/public/timeline.aspx (search for PC17)
Thanks Richard, I have also seen these videos, as you said seems that there nothing more we can do than wait for first .NET 4.0 release.
I've been having a look into Visual Studio 2010 VPC from PDC but nothing is related to touch in it right now.
Hope this .NET 4.0 release will happen soon enough :)
Actually you can download the CTP of VS 2010 and the .NET 4.0 Framework (if you don't mind running it on a virtual machine):
http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-B...
CTP's are very early bits so I am not sure what is all in there. I've decided to wait until the first beta.
-Joe
RSS

