[RESOLVED] [2005] WebBrowser and App Resource
I want to create a ReleaseNotes.htm file to be used in my About form that contains a WebBrowser control on it. I want to keep this ReleaseNotes.htm file in the Resources for my project. However, when I try to pull it out and Navigate to it, the WebBrowser shows nothing.
Here is what I have:
VB Code:
wbReleaseNotes.Navigate(Global.MyApplication.My.Resources.Resources.ReleaseNotes)
Any assistance would be greatly appreciated.
Re: [2005] WebBrowser and App Resource
The resource itself is not a file, but just a string containing the contents of the file.
So if your HTML file has this in it
<h1>HELLO WORLD</h1>
that is all that is actually being stored as the resource.
That being said, the 2005 WB control allows you to easily set a string using
VB Code:
WebBrowser1.DocumentText = My.Resources.Resources.ReleaseNotes
(not sure why you have "resources" twice in your namespace there??)
Re: [2005] WebBrowser and App Resource
I could have sworn that I tried using DocumentText earlier, but it works now.
I don't know why the Resources is duplicated. I just did a find and replace throughout my project and it found 47 of them like that. I originally figured out how to pull an icon or image out of the Resources by checking in the Designer.vb file and that is what was in there. After removing them, it still works file.
Re: [RESOLVED] [2005] WebBrowser and App Resource
well all in all, glad to see its resolved for ya ;)