Webbrowser control for local .htm files 
Author Message
 Webbrowser control for local .htm files

I've got some *.htm files that are local, that is to say, on the same
computer, and in fact, in the same directory, as my .exe file.   In other
words, not at an http: address, they're just off in a c:\whatever directory.

I've used a webbrowser control to display these, in the form:

Option Explicit
Sub form_load()
Dim url1 As String
url1 = CurDir & "\starting.htm"
WebBrowser1.Navigate url1
End Sub

This works pretty good.   Most of the time.

But once in awhile, in no pattern I can see, it tries to connect to the
internet when you do this (I suspect based on whether or not you've
connected to the internet recently).  Othertimes it doesn't and comes up
fine.    I don't need it to connect to the internet, the files are right
there on the computer, and if you cancel out, they display fine.

Is there a way I can tell it, nope, don't even think about trying to connect
to the internet, the files are right there?
************
Tom Luthman

http://www.*-*-*.com/ ~tluthman



Sat, 17 Jan 2004 21:48:42 GMT  
 Webbrowser control for local .htm files
Hi,

Tom Luthman schrieb:

Quote:
> But once in awhile, in no pattern I can see, it tries to connect to the
> internet when you do this (I suspect based on whether or not you've
> connected to the internet recently).  Othertimes it doesn't and comes up
> fine.    I don't need it to connect to the internet, the files are right
> there on the computer, and if you cancel out, they display fine.

Try

WebBrowser1.Offline=True

HTH

Chris

--
Christopher Kleinheitz Offenburg Germany http://jahresarbeit.virtualave.net
"Der Dienst wird mit der dem Wesen des Eisenbahnbetriebs entsprechenden
Raschheit, aber ohne berstrzung ausgefhrt" Dienstvorschrift 408 der Bahn



Mon, 19 Jan 2004 16:21:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. space in name of htm file on local computer

2. Create a local copy of HTM page

3. Using WebBrowser ctl to navigate to a local file

4. Stopping WebBrowser from navigating to local files.

5. Newbie: Linking local files to WebBrowser

6. Stopping WebBrowser from navigating to local files.

7. Stopping WebBrowser from navigating to local files.

8. Help: prevent webbrowser ctrl getting access on local file system

9. GURU needed: VB6 webbrowser: Detect Navigation to local File system -- suppress new window

10. Stopping WebBrowser from navigating to local files.

11. Stopping WebBrowser from navigating to local files.

12. Stopping WebBrowser from navigating to local files.

 

 
Powered by phpBB® Forum Software