1. When the form is initialized, the WebBrowser control's
scripterrorssuppressed = True
(False debug mode, allow script error prompts), or it can be set in other appropriate events.
2. Writing a sub-process
Private Sub Window_error (ByVal sender as Object, _ ByVal e as Htmlelementerroreventargs) ' Ignore Error and suppress popup dialog e.handled = True E nd Sub
3. Call the preceding sub-procedure in the Browser_documentcompleted event of the WebBrowser control, with the following code:
(ByVal sender as Object, _ ByVal e as WebBrowserDocumentCompletedEventArgs) AddHandler CType (sender, WebBrowser). Document.Window.Error, _ AddressOf window_error End Sub
Note: Browser is a WebBrowser control name, such as WebBrowser1.
Http://blog.sina.com.cn/s/blog_40d47c890100n0gn.html
Other methods:
Http://zhidao.baidu.com/question/124054234.html?fr=qrl&cid=867&index=1&fr2=query
Webbrowser1.silent = True
The simplest thing to do is to solve
Http://zhidao.baidu.com/question/70363713.html?fr=qrl&cid=867&index=1
Best Answer
Private Sub Timer1_timer ()
III = III + 1
If III >= 0 Then
Dim dlghwnd As Long
Dim buttonhwnd As Long
dlghwnd = FindWindow ("#32770", "Microsoft Internet Explorer")
Buttonhwnd = GetDlgItem (Dlghwnd, 2) ' of which 2, is obtained by using Spy + + C9/>sendmessage Buttonhwnd, Bm_click, 0&, ByVal 0&
End If
End Sub