Hi there,
Take a look at the following article:
http://Imar.Spaanjaars.Com/QuickDocID.aspx?QUICKDOC=168
This article explains how to embed an image into a Pocket PC Windows forms application, but the principle is the same for all kinds of applications (in fact, anything that can be marked as an assembly) and all kinds of documents you want to embed.
While embedding it is the same, you'll need to retrieve it a bit differently.
First of all, add a using System.IO to your application which you need to access the Stream and StreamReader classes.
Then, in the Load event of the application replace the code that reads the image with this:
Code:
Stream myStream = Assembly.GetExecutingAssembly().
GetManifestResourceStream("EmbeddedTextFiles.IncludeMe.txt");
StreamReader myReader = new StreamReader(myStream);
MessageBox.Show("File Contains: " + myReader.ReadToEnd());
(This code assumes you added a file called IncludeMe.txt to the root of your project)
The hard part of this code is getting the File into a Stream object (similar to retrieving the image). It's then pretty easy to create a new StreamReader based on this Stream, and then use its ReadToEnd method to read in the entire file.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.