HtmlWindow::Close Method ()
Closes the window.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Use the IsClosed property to determine if the window is already closed. If the window is already closed, this method will have no effect.
When you create new windows using Open or OpenNew, Close causes the HTML Document Object Model to open a new instance of Internet Explorer. If you do not call Close on all of the windows you have created, this instance of Internet Explorer will remain running even after your application closes.
The following code example opens a window, and closes it if the user has not used it in the past five minutes. The code example was written under the assumption that your form has a WebBrowser control named WebBrowser1, a Button named Button1, and a Timer class named Timer1. To run this example successfully, change the first argument supplied to OpenNew to a valid URL.
Available since 2.0