Answer the question
In order to leave comments, you need to log in
How to use the built-in web browser in Visual Studio in c++ forms projects?
In my project, I use the standard web browser built into Visual Studio 2015. It has a URL definition as input parameters in the form:
webbrowser->URL = (gcnew System::URIs(L" something ", System::UriKind::Absolute));
It is necessary to open a local .htm page located in the folder with the executable file, i.e. path to the executable file:
/program/Run.exe
path to the page:
/program/HTML_page.htm
When a relative path is specified, UriKind is set to Relative
The line itself in the code looks like:
webbrowser->URL = (gcnew System::URIs(L" /HTML_page.htm", System::UriKind::Relative));
The error that occurs when setting a link like this:
It is not possible to navigate to the corresponding URL.
This error does not occur when specifying an absolute path to a file located on the local machine.
How can I open a local web page with a relative link?
Answer the question
In order to leave comments, you need to log in
webbrowser->URL = (gcnew System::URIs(L" . /HTML_page.htm", System::UriKind::Relative)); not?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question