How to load .html file from embedded resources using a web browser in Visual Basic 2010

Visual basic 2010

I try this

myWebBrowser1.Navigate (My.Resources.HomePage)

but it fails it shows that "The value is not in the expected range."

PS: HomePage is an .html file, I am adding it to the project resources. (embedded)

Please help me ~

+4
source share
1 answer

Something like that:

VB Code:

Private Sub DisplayHtml()
  Me.WebBrowser1.Navigate("about:blank")
  Me.WebBrowser1.Document.Write(String.Empty)
  Me.WebBrowser1.DocumentText = My.Resources._Readme
End Sub

you can use this as a reference to your problem:

http://weblogs.asp.net/gunnarpeipman/archive/2009/08/15/displaying-custom-html-in-webbrowser-control.aspx

+4
source

Source: https://habr.com/ru/post/1525634/


All Articles