Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
how do i dispose of a runtime created webbrowser? The browser isnt display on the form. I also prevent new windows from opening.
most of the time this seem to work. But something i still hear ads running with video in the back.
VB.NET:
Dim browser as New WebBrowser
AddHandler browser.NewWindow, AddressOf Browser_NewWindow
.
.
.
browser=nothing
Private Sub Browser_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
e.Cancel = True
End Sub
most of the time this seem to work. But something i still hear ads running with video in the back.