Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2005-04-22
Medium Priority
Last Modified: 2010-04-23
Hi All , I am new in vb.net 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

RobertRFreeman earned 1000 total points
ID: 13847322
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

577 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