window.close() freezes .NET 2.0 WebBrowser Control in Windows Form application

In the spirit of my post: How To: Close the Form hosting the WebBrowser control when scripting calls window.close in the .Net Framework version 2.0 the .NET 2.0 WebBrowser control has no control over the close events like WindowClosing.  One valid solution is to use the ActiveX version of the WebBrowser control.  Currently the .NET 2.0…

1

How to wire the readystatecomplete event from the XMLHttp object in InternetExplorer (.NET)

I have a web page that has a global variable in the jscript called xmlhttp.  It is the build in XMLHttp object in Internet Explorer.  I am hosting the WebBrowser control in a C# (.NET managed code) application and I want to know when the XMLHttp object is done.  This occurs after the document complete…

2

How To: Close the Form hosting the WebBrowser control when scripting calls window.close in the .Net Framework version 2.0

By design the WebBrowser Control does not close the parent Form when WebBrowser Control is closed.  Here is one way you can accomplish this. The WebBrowser will send a WM_NOTIFYPARENT notification that can be captured and an event raised that a host can respond to. Here is the documentation on the WM_NOTIFYPARENT notification:  http://msdn2.microsoft.com/en-us/library/ms632638.aspx In…

3

How To: Capture the NewWindow2 Event from a Managed WebBrowser Control

The articles referenced in my post Internet Explorer WebBrowser Control loses state… discusses sinking this event by adding an unmanaged version of the WebBrowser control to your Form and using that.  But what if you want to use the Managed version?  The manged version of the WebBrowser control is really a wrapper around the unmanaged…

2

Internet Explorer WebBrowser Control loses state when JScript performs a call to Window.Open

Session state for a web site is often stored in cookies.  If you use the WebBrowser control in an program and the target website responds to an action with a call to Window.Open, then mysteriously the cookies for that site are not transmitted with the request. Cause:  Window.Open creates a window using the IExplore.exe process…

0