Results 1 to 5 of 5

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2013

    Question WebBrowser control is not displaying local HTML files

    Hi guys

    I wasted a week so far reading and trying all the solutions I can find on the net only to find that they do no work.

    I have a listbox that shows the filename of all files in a "show" folder. Clicking on a filename should display the HTML file in the webbrowser control.

    Here is the code I'm using at the moment and the actual file location is "D:\The Penfound Project\family\show\1.html"

       Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
            Dim SF, URLString As String
            SF = ListBox1.SelectedItem.ToString
            SF = myPath & SF
            WebBrowser1.AllowNavigation = True
            URLString = "file:///" & SF
            URLString = URLString.Replace("\", "/") 'this does not work
            'URLString = "https://penfound.org" 'this works
        End Sub
    When I click on a filename the program locks up wit ha blank browser area.
    Last edited by dday9; Mar 5th, 2018 at 03:18 PM.

Tags for this Thread

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.