コード例 #1
0
ファイル: Form1.cs プロジェクト: xiajiaonly/MultiTouchVista
 private void Form1_Load(object sender, EventArgs e)
 {
     contactHandler                 = new ContactHandler(Handle);
     contactHandler.NewContact     += HandleContact;
     contactHandler.ContactRemoved += HandleContact;
     contactHandler.ContactMoved   += HandleContact;
     contactHandler.Frame          += HandleFrame;
     contactHandler.ReceiveImageType(ImageType.Normalized, true);
     contactHandler.ReceiveImageType(ImageType.Binarized, true);
     contactHandler.ReceiveEmptyFrames = true;
 }
コード例 #2
0
        void Window1_Loaded(object sender, RoutedEventArgs e)
        {
            WindowInteropHelper helper = new WindowInteropHelper(this);

            contactHandler        = new ContactHandler(helper.Handle);
            contactHandler.Frame += HandleFrame;
            contactHandler.ReceiveImageType(ImageType.Binarized, true);
            contactHandler.ReceiveEmptyFrames = true;
        }