I am developing an ActiveX control that incorporates a web browser
control. I am trying to navigate using this, but I am having some
problems.
The following works:
webbrowser1.Navigate2 "http://www.microsoft.com"
This works and shows a directory listing
webbrowser1.Navigate2 "c:/"
This does not work:
webbrowser1.Navigate2 "c:/test.html"
However, entering c:/test.html in the title bar of my stand alone web
browser (IE5.5) works OK.
Does anyone have any ideas as to what I might be doing wrong here and
how to navigate to "c:/test.html" (I am using VB6 and IE5.5 on NT
4.0)
Thanks,
Richard
rdj AT btopenworld DOT com
> This works and shows a directory listing
> webbrowser1.Navigate2 "c:/"
> This does not work:
> webbrowser1.Navigate2 "c:/test.html"
> However, entering c:/test.html in the title bar of my stand alone web
> browser (IE5.5) works OK.
I'm not familiar with the WebBrowser control, but I think you might need to
specify the file: protocol. Just as www.microsoft.com is really
http://www.microsoft.com (the protocol is HTTP), so c:/test.html is really
file:///c:/test.html
Just a suggestion - I can't guarantee it will work.
Eq.
--
Equinox Tetrachloride
Not sociophobic, just avoiding you.
www.cl4.org - www.insecurities.org
flags:
navOpenInNewWindow 1 Open the resource or file in a new window.
navNoHistory 2 Do not add the resource or file to the
history list. The new page replaces the current page in the list.
navNoReadFromCache 4 Do not read from the disk cache for this
navigation.
navNoWriteToCache 8 Do not write the results of this navigation to the
disk cache
--
--
Richard Jonas <r...@dircon.co.uk> wrote in message
news:ff53c0c7.02030...@posting.google.com...
I then created an application to contain the control (not the web
browser), and this worked. I think the problem was that I was using a
web browser to debug an ActiveX control that contained a web browser.
Using Navigate or Navigate2 seems to make little difference. Also
thanks to for the suggestion of prefixing the URL with "file://", but
this did not affect things in this case.
Regards,
Richard.
"mayayana" <maya...@mindspring.com> wrote in message news:<a61692$dfo$1...@slb6.atl.mindspring.net>...