Wednesday, March 14, 2012

How to get Input From Entire Screen on Microsoft Surface

On Microsoft Surface, in order to detect TouchPoint input, you must create a new instance of the TouchTarget class (a.k.a. ContactTarget prior to v2.0)

The first parameter to the TouchTarget constructor is an IntPtr handle to an application window.  If you pass in a handle to a window running in a different process, you'll get an error.  This originally led me to believe that in order to detect touch input, you had to have a windowed application, and there was no option to detect touches occurring outside that window.

Fortunately, I was incorrect.

To use the whole screen as your TouchTarget, simply pass in IntPtr.Zero as your window handle, like so:


          new TouchTarget(IntPtr::Zero, Core::EventThreadChoice::OnBackgroundThread ); 
 

If you do this, keep in mind that TouchPoints you receive will have x and y coordinates relative to the screen, not your application window.  

2 comments:

  1. Licenses from European international locations are usually probably the most respected ones, as these are the oldest gambling licensing jurisdictions. Have a a glance at|have a glance at} ourCashout processing timesbefore deciding on your payment methodology and browse by way of ourCashout Policy. There could be some paperwork you need to|you should|you have to} present find a way to} kickstart the cashout process. You can anticipate the screen to load, and as soon as} that’s carried out shall be able|it is possible for you to} begin out|to begin} enjoying in}. You additionally don’t have to fret about opening occasions, as web-based casinos can be found 365 days days|one 파라오카지노 year} of the yr, 24 hours a day.

    ReplyDelete
  2. The complete data collection interval lasted from 2014 till end 2015. For each of seven orthopaedic fashions across three orientations on the print bed, estimated print time and material use have been recorded from the slicing software for each printer and corresponding print setting. For some printers and settings, not all fashions could possibly be} sliced, and due to this fact print time and material use estimates could not be obtained . We have accounted for this when decoding data by omitting incomplete Slippers for Women data equally across all in contrast datasets.

    ReplyDelete