none
Using a WebBrowser control with a treeview for a help utility - question RRS feed

  • Question

  • I have a project in which I also am including a winform for help.  On the form I used a Split where the left side is the treeview with the help topic nodes and then on selection, I would like the winform control on the right to open a file that I have added to the project, except whenever I try to use the path to that file, it fails.  Under the project I have a Files | HelpFiles folder where some html content files are going, then I am using a streamreader to open and display the file.  When troubleshooting, I did copy the files to a share, pointed the browser to the share and it works.  I have also changed the property of the file to Copy If Newer to the Output directory.  Is there something I am missing?  

    Here is my code and syntax if Node(0) is clicked.  Thanks for any help

    Dim reader As New StreamReader("..\Files\HelpFiles\Purpose.html") webHelp.DocumentText = reader.ReadToEnd()


    Brad Allison

    Thursday, June 20, 2019 5:10 PM

Answers

  • Before finding a more appropriate solution, use the Copy if Newer option, check that the folders and files exist in "bin\Debug" or "bin\Release" subfolder of your project, and try “.\Files\HelpFiles\Purpose.html”.


    Thursday, June 20, 2019 5:18 PM

All replies

  • Before finding a more appropriate solution, use the Copy if Newer option, check that the folders and files exist in "bin\Debug" or "bin\Release" subfolder of your project, and try “.\Files\HelpFiles\Purpose.html”.


    Thursday, June 20, 2019 5:18 PM
  • Thanks for the help.  That seemed to do the trick

    Brad Allison

    Thursday, June 20, 2019 5:35 PM