private void camStartButton_Click(object sender, RoutedEventArgs e) { try { WebCamCtrl.StartCapture(); } catch (Microsoft.Expression.Encoder.SystemErrorException) { MessageBox.Show("Device is in use by another application"); } }
private void StartButton_Click(object sender, RoutedEventArgs e) { try { // Display webcam video on control. WebCamCtrl.FrameSize = new System.Drawing.Size(450, 310); WebCamCtrl.StartCapture(); } catch (Microsoft.Expression.Encoder.SystemErrorException ex) { MessageBox.Show("Device is in use by another application"); } }