Using WebBrowser ctl to navigate to a local file 
Author Message
 Using WebBrowser ctl to navigate to a local file

I have a problem trying to make my VB program backwards compatible with
IE4's version of the WebBrowser object when trying to navigate to a file on
the local hard drive.

All of the following work with VB6 and IE5 installed on the same machine
(Windows 98), as an argument of the Navigate2 method.

X:\NewWebSite\Xoom\Changes.htm
"X:\NewWebSite\Xoom\Changes.htm"
file://X:\NewWebSite\Xoom\Changes.htm
file://"X:\NewWebSite\Xoom\Changes.htm"
file://"X:/NewWebSite/Xoom/Changes.htm"
file://X:/NewWebSite/Xoom/Changes.htm

None of the above work with VB6 and IE4, on Win95. I always get:
     Error 5: Invalid procedure call or argument
triggered by the Navigate2 statement.

Anyone know the correct syntax for a local file specified on the Navigate2
method when using VB6 and IE4? What about IE3?

thanks
Doug Anderson
Brisbane, Australia



Thu, 10 Jan 2002 03:00:00 GMT  
 Using WebBrowser ctl to navigate to a local file
Works for me:

Private Sub Form_Load()
WebBrowser1.Navigate "c:\ "
End Sub

Quote:

>I have a problem trying to make my VB program backwards compatible with
>IE4's version of the WebBrowser object when trying to navigate to a file on
>the local hard drive.

>All of the following work with VB6 and IE5 installed on the same machine
>(Windows 98), as an argument of the Navigate2 method.

>X:\NewWebSite\Xoom\Changes.htm
>"X:\NewWebSite\Xoom\Changes.htm"
>file://X:\NewWebSite\Xoom\Changes.htm
>file://"X:\NewWebSite\Xoom\Changes.htm"
>file://"X:/NewWebSite/Xoom/Changes.htm"
>file://X:/NewWebSite/Xoom/Changes.htm

>None of the above work with VB6 and IE4, on Win95. I always get:
>     Error 5: Invalid procedure call or argument
>triggered by the Navigate2 statement.

>Anyone know the correct syntax for a local file specified on the Navigate2
>method when using VB6 and IE4? What about IE3?

>thanks
>Doug Anderson
>Brisbane, Australia



Thu, 10 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Stopping WebBrowser from navigating to local files.

2. Stopping WebBrowser from navigating to local files.

3. Stopping WebBrowser from navigating to local files.

4. Stopping WebBrowser from navigating to local files.

5. Stopping WebBrowser from navigating to local files.

6. Stopping WebBrowser from navigating to local files.

7. WebBrowser Ctl: save web page to local machine

8. IE5 Causing Crash Using Webbrowser.navigate

9. WebBrowser control Navigate without using cache

10. Navigating to HTML document anchors using the WebBrowser control

11. Referrer data not being passed when using the Navigate method of the WebBrowser Control

12. Referrer property not being set properly when using the Navigate method of the WebBrowser control

 

 
Powered by phpBB® Forum Software