Results 1 to 4 of 4

Thread: [RESOLVED] [2005] WebBrowser and App Resource

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    Resolved [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:
    1. wbReleaseNotes.Navigate(Global.MyApplication.My.Resources.Resources.ReleaseNotes)

    Any assistance would be greatly appreciated.
    My.Settings.Signature = String.Empty

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    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:
    1. WebBrowser1.DocumentText = My.Resources.Resources.ReleaseNotes

    (not sure why you have "resources" twice in your namespace there??)

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2003
    Posts
    758

    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.
    My.Settings.Signature = String.Empty

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [RESOLVED] [2005] WebBrowser and App Resource

    well all in all, glad to see its resolved for ya

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width