Results 1 to 15 of 15

Thread: web browser[RESOLVED]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Resolved web browser[RESOLVED]

    Hi all,
    back again. I found this example on these forums for a web browser in vb.


    VB Code:
    1. Private Sub Form_Activate()
    2. With WebBrowser1
    3.       .Width = Me.Width
    4.       .Height = Me.Height
    5.       .Navigate "http://www.Vbforums.com"
    6. End With
    7. 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

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: web browser

    open "file://myfilename.htm"

    ps. i posted a web browser in the next link (or previous one)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    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

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    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

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Re: web browser

    yours looks much more complex than just this code I found.

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Activate()
    4. With WebBrowser1
    5.       .Width = Me.Width
    6.       .Height = Me.Height
    7.       .Navigate "http://www.Vbforums.com"
    8. End With
    9. End Sub
    10.  
    11. Private Sub Form_Load()
    12. Me.WindowState = 2
    13. 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

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    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

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    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

  11. #11
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: web browser

    This will work for any file that can be opened.

    VB Code:
    1. file:///C:/temp/FileIn.txt
    (but the slashes can go either way)

    i copied this out of FireFox's window.

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Re: web browser

    sorry whereabouts does that need to go?

  13. #13
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: web browser

    for the value of .Navigate, instead of the http://url.com

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Re: web browser

    Thanks very much

  15. #15
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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
  •  



Click Here to Expand Forum to Full Width