private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (mainUrl.StartsWith("http://www.watchever.de/player/") && webBrowser1.Document.Body.InnerHtml.Contains("<DIV class=einloggen>")) { FormLogin formLogin = new FormLogin(); formLogin.ShowDialog(); ASCIIEncoding Encode = new ASCIIEncoding(); byte[] post = Encode.GetBytes("login="******"&password="******"&remember=rememberMe"); string url = "http://www.watchever.de/CN/"; string PostHeaders = "Content-Type: application/x-www-form-urlencoded"; webBrowser1.DocumentCompleted -= webBrowser1_DocumentCompleted; nativeBrowser.Navigate(url, null, null, post, PostHeaders); } if (e.Url.AbsolutePath == webBrowser1.Url.AbsolutePath) { System.Threading.Thread.Sleep(100); ((SHDocVw.WebBrowser)webBrowser1.ActiveXInstance).ExecWB(SHDocVw.OLECMDID.OLECMDID_OPTICAL_ZOOM, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, zoom, IntPtr.Zero); webBrowser1.DocumentCompleted -= webBrowser1_DocumentCompleted; webBrowser1.Navigate("javascript:window.scrollBy(0,-500);"); } }