title: Webbrowser disable all audio output - from online radio to youtube
body: <p>My webbrowser:</p>
  
  <p>XAML:</p>
  
  <pre><code>//...
  xmlns:my="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  //...
  &lt;my:WindowsFormsHost Name="windowsFormsHost"/&gt;
  </code></pre>
  
  <p>Code behind C#:</p>
  
  <pre><code>System.Windows.Forms.WebBrowser Browser = new System.Windows.Forms.WebBrowser();
  windowsFormsHost.Child = Browser;
  </code></pre>
  
  <p>My question is how to disable all audio output.</p>
  
  <p>I found this:</p>
  
  <p>C#:</p>
  
  <pre><code>private const int Feature = 21; //FEATURE_DISABLE_NAVIGATION_SOUNDS
  private const int SetFeatureOnProcess = 0x00000002;
  
  [DllImport("urlmon.dll")]
  [PreserveSig]
  [return: MarshalAs(UnmanagedType.Error)]
  static extern int CoInternetSetFeatureEnabled(int featureEntry,
    [MarshalAs(UnmanagedType.U4)] int dwFlags, 
    bool fEnable);
  </code></pre>
  
  <p>Its fine, but this code disable only "click" sound, so its kind of useless in this case.</p>
  
  <p>I just want from my application 100% mute, no sounds at all.</p>
  
  <p>I've read that in this webbrowser it need to be done through Windows Sounds, but I cant really bielieve that I cant do this in code.</p>