title: WebBrowser Control disable mouse clicks
body: <p>I want to show a YouTube video inside a WebBrowser control, but I want to disable all user interactions (no mouse clicks no keyboard events...).</p>
  <p>I am catching all control's preview, mouse and keyboard events and furthermore I put some handlers to the loaded HTML document, but without any success:</p>
  <pre><code> void webBrowser1_DocumentCompleted( object sender, WebBrowserDocumentCompletedEventArgs e )
   {
       if(webBrowser1.Document != null) {
           var doc = webBrowser1.Document;
           
           doc.Body.Style = &quot;overflow:hidden&quot;;
           doc.Click      += htmlDoc_Click;
           doc.MouseDown  += htmlDoc_MouseDown;
           doc.MouseMove  += htmlDoc_MouseMove;
               
           webBrowser1.Document.Body.Click     += new HtmlElementEventHandler(htmlDoc_Click);
           webBrowser1.Document.Body.MouseDown += new HtmlElementEventHandler(Document_MouseDown);
           webBrowser1.Document.Body.MouseUp   += new HtmlElementEventHandler(Document_MouseMove);
           webBrowser1.Document.Body.MouseUp   += new HtmlElementEventHandler(Document_MouseUp);
           
           
           HtmlElement head = doc.GetElementsByTagName(&quot;head&quot;)[0];
           HtmlElement mscript = doc.CreateElement(&quot;script&quot;);
           IHTMLScriptElement element = (IHTMLScriptElement)mscript.DomElement;
           element.text = &quot;function handleMouseEvent(e) { &quot;
                        + &quot;var evt = (e==null ? event:e); &quot;
                        + &quot;return true; } &quot;
                        + &quot;document.onmousedown = handleMouseEvent; &quot;
                        + &quot;document.onmouseup   = handleMouseEvent; &quot;
                        + &quot;document.onclick     = handleMouseEvent; &quot;;
           head.AppendChild(mscript);
       }
   }
  </code></pre>
  <p>Also it would be fine to overlay a transparent Control &quot;in front of&quot; the WebBrowser control.</p>