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; }
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; }