title: WebBrowser Close event without message
body: <p>I'm making a Facebook share in C#, but when i share a link the Facebook force close the Window and shows the message: "The webpage you are viewing is trying to close the window. Do you want to close it?".</p>
  
  <p>How can i remove this message?</p>
  
  <p>I already tried this: <a href="https://stackoverflow.com/questions/14742498/catching-and-handling-web-browser-close-event">Catching and handling Web Browser Close Event</a> but don't work.</p>
  
  <p>My code to share is:</p>
  
  <pre><code>public void doShare(string url)
      {
          string shareURL = "http://www.facebook.com/sharer/sharer.php?u=" + url;
          wb.Navigate(shareURL);
          while (wb.ReadyState != WebBrowserReadyState.Complete)
          {
              Application.DoEvents();
          }
          wb.Document.GetElementById("u_0_0").InvokeMember("click");
      }
  </code></pre>