title: webcam, Video Source dialog comes up
body: <p>So have seen a ton of people with the same issue's but no answers.  My SendMessage pop's up the "Video Source" dialog box on a windows 7 laptop with one camera.  I have Cyber Link YouCam installed.
  <img src="https://i.stack.imgur.com/dlf2N.png" alt="&#39;Video Source&#39; dialog box"></p>
  
  <p>If I uninstall Cyber Link YouCam the "Video Source" dialog goes away.  It appears to be the OS is acting as though YouCam is a second driver for the same device.  My question is how do I stop the dialog box for "Video Source" from appearing?  Once I choose an option in the dialog I don't get the dialog box (until I restart the application) so there must be a setting somewhere being set.   </p>
  
  <p>Though debugging found this bit of code (see whole section below) is the one that seems to be the one that calls the dialog box - SendMessage (deviceHandle, WM_CAP_CONNECT, deviceno, ((IntPtr) 0).ToInt32 ())</p>
  
  <pre><code> public void StartWebCam (int height, int width, int handleofthepicturebox, int deviceno)
          {
  
          string deviceIndex = "" + deviceno;
  
          deviceHandle = capCreateCaptureWindowA (ref deviceIndex, WS_VISIBLE | WS_CHILD, 0, 0, width, height, handleofthepicturebox, 0);
  
  
          if (SendMessage (deviceHandle, WM_CAP_CONNECT, deviceno, ((IntPtr) 0).ToInt32 ()) &gt; 0)
              {
  
  
              SendMessage (deviceHandle, WM_CAP_SET_SCALE, -1, 0);
              SendMessage (deviceHandle, WM_CAP_SET_PREVIEWRATE, 0x42, 0);
              SendMessage (deviceHandle, WM_CAP_SET_PREVIEW, -1, 0);
  
              }
          else
              {
              // nothing failed maybe some clean up needed
              }
  
          }
  </code></pre>
  
  <p>So again the question is -   how do I stop the dialog box for "Video Source" from appearing?</p>