I open the page in WebBrowser and it works for me (for example, Google):

 WebBrowser1.Navigate('http://www.google.com'); 

I need to take the html file (which is stored on my computer), add it to the project (so that html does not hang out as a separate file, but was in the project) and open this html file through a browser.

Tell me how to do this?

  • WebBrowser1.Navigate ('C: /WebServers/home/test1.ru/www/index.html'); - rareMax pm

2 answers 2

As RCDATA, store HTML in exe resources, as needed, extract it into a temporary folder and open it via Navigate, specifying the path to it.

  • 3
    if from resources, it is better from dll. And if from a dll, then it is better to use a separate file, and if it is a separate file, then it is better to html, which you need to write with the installer, better in appdata ... - Yura Ivanov

And as always, everything complicates things forever.

  1. Create a memo and browser.
  2. In the memo you write the source code of the page,
  3. In the browser, when you start the form, you write the autblank and after it you assign the source code from the memo to the browser
  4. And he will display your page. That's all!

Well, then the matter of technology - at its discretion.