Hi,
I have a doubt with the new windows popup's handler, when I download a file appears a popup form with a showdialog to save, it's right, but when I close the showdialog the new windows popup do not close, How do I close it?
Thanks for support
My code (form this page) is:
Quote:Private Sub WebView1_NewWindow(sender As Object, e As EO.WebBrowser.NewWindowEventArgs) Handles WebView1.NewWindow
e.Accepted = True
Dim WebBrowerOnPopup = New EO.WebBrowser.WinForm.WebControl
Dim popupForm As New System.Windows.Forms.Form
popupForm.ClientSize = New System.Drawing.Size(System.Convert.ToInt32(e.Width), System.Convert.ToInt32(e.Height))
popupForm.Controls.Add(WebBrowerOnPopup)
WebBrowerOnPopup.Dock = DockStyle.Fill
WebBrowerOnPopup.WebView = e.WebView
popupForm.Show()
AddHandler popupForm.FormClosed, AddressOf Form_Closed
End Sub
Private Sub Form_Closed(sender As Object, e As FormClosedEventArgs)
Dim popupForm As New System.Windows.Forms.Form
popupForm = CType(sender, System.Windows.Forms.Form)
Dim webBrowserOnPopup As EO.WebBrowser.WinForm.WebControl = CType(popupForm.Controls.Item(0), EO.WebBrowser.WinForm.WebControl)
'Call Destroy on the popup WebView
webBrowserOnPopup.WebView.Destroy()
End Sub