How to Fix the Memory Leak in IE WebBrowser Control?

my app was also constantly consuming memory when navigating, and not releasing anymore. i fount the solution for me here: http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopment/thread/88c21427-e765-46e8-833d-6021ef79e0c8 for completeness ill post the notable excerpt: — in class definition [DllImport(“KERNEL32.DLL”, EntryPoint = “SetProcessWorkingSetSize”, SetLastError = true, CallingConvention = CallingConvention.StdCall)] internal static extern bool SetProcessWorkingSetSize(IntPtr pProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize); [DllImport(“KERNEL32.DLL”, EntryPoint = … Read more

Best approach to get RTSP streaming into web browser from IP Camera?

Here is a blog entry, or tutorial if you will, that achieves something very similar. Their setup slightly different, but this is the summary: use ffmpeg to convert your input into mpeg1video: ffmpeg -i rtsp://whatever -f mpeg1video -b 800k -r 30 http://localhost:8082/yourpassword/640/480/ Install node.js with stream-server.js script from jsmpeg and ws ws WebSocket package. To … Read more

How do I turn off Compatibility View on the IE WebBrowserControl in a WinForms app?

There is no way to do this other than configuring the following registry settings: HKLM\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION or if it’s a 32 bit app on 64 bit Windows: HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION` These settings aren’t surfaced in the WebBrowser control. For more information please see: What IE compatibility mode does the webbrowser control use? In case the link … Read more

C# how to wait for a webpage to finish loading before continuing

Try the DocumentCompleted Event: webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowser_DocumentCompleted); void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { webBrowser.Document.GetElementById(“product”).SetAttribute(“value”, product); webBrowser.Document.GetElementById(“version”).SetAttribute(“value”, version); webBrowser.Document.GetElementById(“commit”).InvokeMember(“click”); }

Web Browser component is IE7 not IE8? How to change this?

It appears you need to fiddle with the registry as per this article: – http://blogs.msdn.com/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx To run a WebBrowser control in IE8 Standards Mode, use the following new value into the registry: [(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION] “MyApplication.exe” = dword 8000 (Hex: 0x1F40) To run in IE7 Standards Mode, use the following registry value: [(HKEY_CURRENT_USER or … Read more

Is it possible to transfer authentication from Webbrowser to WebRequest

If the question is only “How to transfer Webbrowser authentication information to Webrequest or Webclient?” this code is enough: You can call the GetUriCookieContainer method that returns you a CookieContainer that can be used for subsequent call with WebRequest object. [DllImport(“wininet.dll”, SetLastError = true)] public static extern bool InternetGetCookieEx( string url, string cookieName, StringBuilder cookieData, … Read more

C# WebBrowser Ajax call

WebBrowser control (both WPF and WinForms versions) behaves in many ways differently from the full IE. You may want to implement Feature Control to bring its behavior as close to IE as possible (particularly, FEATURE_BROWSER_EMULATION), this often solves the script compatibility issues. Here is some code, note that it does not require admin rights to … Read more

Add new Microsoft Edge to web browser control?

UPDATE Jan 2021: WebView2 has been released. This enables integration of the Chromium based Edge as a web control. It’s a lot more complicated to use, unfortunately, but a lot more powerful. Works with WinForms or WPF or C++ apps. https://learn.microsoft.com/en-us/microsoft-edge/webview2/ UPDATE May 2018: FINALLY Microsoft has made it easy. https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/ For now, the new … Read more