How to navigate using WebBrowser Control? I want to open a C:\file1.html... an example code wou开发者_开发技巧ld be appreciated.
The VB code you have is correct, that is an error with the javascript on the page you are loading, so you can use:
Private Sub Command1_Click()
WebBrowser1.Navigate2 "C:\file1.html"
End Sub
But in Form_Load set silent mode, eg:
Private Sub Form_Load()
WebBrowser1.silent = true
End Sub
i first put a webcomponent as mentioned in the post "How do i open a webpage" in vb6 by adatapost
Private Sub Command1_Click()
WebBrowser1.Navigate2 "C:\file1.html"
End Sub
this works but as u click on the button it pops a error..A error has occured on the scirpt of the page , line 6, Error: object expected, url: file:///C:file1/index.html, do u want to continue , yes or NO............................how to come around this error. ??
精彩评论