OUR NETWORK:MediaSmart Home Sansa Community Explore3DTV TechLore RoboCommunity Dijit Community About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 782858.0
January 15, 2009 05:37 AM
Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

JaYmZ666

Member
Joined: 01/15/2009

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.

Discussion:    Add a Comment | Comments 1-10 of 10 | Latest Comment

January 15, 2009 8:08 AM

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.

January 15, 2009 8:51 AM

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.

January 15, 2009 8:53 AM

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

January 15, 2009 8:56 AM

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?

January 15, 2009 9:13 AM

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.

January 15, 2009 9:18 AM

Ok thanks a lot for your help again Joe, I'll try to have a look over there.
Cheers, Ben.

January 15, 2009 9:42 AM

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#

January 15, 2009 10:45 AM

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)

January 16, 2009 3:29 AM updated: January 16, 2009 6:00 AM

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 :)

January 16, 2009 3:34 PM

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

Discussion:    Add a Comment | Back to Top | Comments 1-10 of 10 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window