|
-
Feb 17th, 2005, 11:42 PM
#1
Thread Starter
Hyperactive Member
web browser[RESOLVED]
Hi all,
back again. I found this example on these forums for a web browser in vb.
VB Code:
Private Sub Form_Activate()
With WebBrowser1
.Width = Me.Width
.Height = Me.Height
.Navigate "http://www.Vbforums.com"
End With
End Sub
is it possible to load a local html file into this.
thanks
R
Last edited by robvr6; Feb 18th, 2005 at 02:55 AM.
Reason: RESOLVED
-
Feb 17th, 2005, 11:47 PM
#2
Re: web browser
open "file://myfilename.htm"
ps. i posted a web browser in the next link (or previous one)
-
Feb 17th, 2005, 11:50 PM
#3
Thread Starter
Hyperactive Member
Re: web browser
I should have known that lol - all good stuff I wish I could start learnin some of these cool things but I learn more here than college lol.
so do I just replace the url with the file etc
thanks very much again
Rob
-
Feb 17th, 2005, 11:53 PM
#4
Thread Starter
Hyperactive Member
Re: web browser
Oh by the way why I was enquiring about the web browser is a mate of mine can run the swf from his website and it works fine so I was thinkin about givin it a go - thinkin it will be the same principal.
thanks again
Rob
-
Feb 17th, 2005, 11:55 PM
#5
Re: web browser
that is because it opens in the ActiveX component (OCX) of flash player, and I couldn't figure out how to call/load it. That'll work.
-
Feb 18th, 2005, 12:02 AM
#6
Thread Starter
Hyperactive Member
Re: web browser
yours looks much more complex than just this code I found.
VB Code:
Option Explicit
Private Sub Form_Activate()
With WebBrowser1
.Width = Me.Width
.Height = Me.Height
.Navigate "http://www.Vbforums.com"
End With
End Sub
Private Sub Form_Load()
Me.WindowState = 2
End Sub
will it work the same way to let it point to a local file.
Also one quick question I have the deitel & deitel book if you know it and there is a web browser tutorial to work through in that. will any browser load flash or does it need to be a complex one? Sorry if Im asking too many questions.
thanks Rob
-
Feb 18th, 2005, 12:07 AM
#7
Re: web browser
I couldn't get a flash filel to open in any browser. It has to be on a website
It also has to use the ActiveX control. Just a heads up.
-
Feb 18th, 2005, 12:27 AM
#8
Thread Starter
Hyperactive Member
Re: web browser
do you mind if I have a go at using the web browser you posted. I think I will only need the text box and where the page is displayed - I just thought it good manners to ask first.
also with me bieng the numbnuts that I am if I wanted to load a flat text html file into it such as a readme would this be complicated
thanks Rob
-
Feb 18th, 2005, 12:30 AM
#9
Re: web browser
I didn't write it. I saw it, liked it, saw that it worked, so I posted it again.
Feel free to do whatever you want with/to it.
-
Feb 18th, 2005, 12:38 AM
#10
Thread Starter
Hyperactive Member
Re: web browser
I promise this is the last time I'll bother you for a while. could you just tell me where I need to change to load a readme file locally. If you could
and thanks again
R
-
Feb 18th, 2005, 01:17 AM
#11
Re: web browser
This will work for any file that can be opened.
VB Code:
file:///C:/temp/FileIn.txt
(but the slashes can go either way)
i copied this out of FireFox's window.
-
Feb 18th, 2005, 01:19 AM
#12
Thread Starter
Hyperactive Member
Re: web browser
sorry whereabouts does that need to go?
-
Feb 18th, 2005, 02:22 AM
#13
Re: web browser
for the value of .Navigate, instead of the http://url.com
-
Feb 18th, 2005, 02:28 AM
#14
Thread Starter
Hyperactive Member
Re: web browser
Thanks very much
-
Feb 18th, 2005, 02:42 AM
#15
Re: web browser
Not a problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|