Results 1 to 2 of 2

Thread: Open file chm in resource

  1. #1

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Open file chm in resource

    I want to open file help in my resoure.
    I use
    Code:
    process.start(filename)
    but it is error.
    Any one have suggest ?
    Last edited by manhit45; Dec 21st, 2009 at 10:15 AM.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  2. #2
    Hyperactive Member gonzalioz's Avatar
    Join Date
    Sep 2009
    Location
    <body></body>
    Posts
    508

    Re: Open file chm in resource

    When you store a file in a resource file. You just store a really big byte array that represents the content of your file. So when you call Me.Resources.MyHelpFile it will return a byte().

    You can turn this byte() back in a file like this:
    Code:
            Dim binWriter = New IO.BinaryWriter(IO.File.Create("help.chm"))
            binWriter.Write(My.Resources.MyHelpDocument)
            binWriter.Close()
    
            Process.Start("help.chm")
    Hope that helps!

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