How to Embedd text files in a DLL and call specific sections of these files

Posted on 2005-04-22
Last Modified: 2010-04-23
Hi All , I am new in I need to know where to start to create a dll which contains named text files. and then call a section of one of these text files from the main form.
thank you in advance.
Question by:Alpenist_05
    1 Comment
    LVL 16

    Accepted Solution

    Here is a link for accessing an image as an embedded resource.

    To apply this to your situation:
    Add the text file to your project (AssemblyName) and set the Build Action property for that file in Solution Explorer/Property window to Embedded Resource.

    then use the following to access the text:

    Private Sub DisplayText()
        Dim sr As new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("AssemblyName.MyText.txt"))
        Dim myString as string = sr.ReadToEnd
    End Sub

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Article by: jpaulino
    XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now