You would need to use the GetManifestResourceStream method of the currently executing assembly.
Here's a couple of articles which should clarify the concept (both of resource creating and accessing them.) : http://support.microsoft.com/kb/319292 http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=75 http://www.codeproject.com/KB/dotnet/embeddedresources.aspx On Jun 16, 4:07 am, raoul <[email protected]> wrote: > Sorry for the newbie question, but I can't quite work this out, and I > can't imagine it is that difficult. I am using Visualbasic 2005 > express. > > I have written a program that requires a bunch of data to be read from > a file. It currently opens the data file using streamreader, and > reads in the contents of the file into a string. I go through the > string and seperate the values into the appropriate variable arrays > using a space to deliminate the data columns. > > All of this works just fine. However, it requires me to include the > data file with the executable as a seperate file and the user has to > put them in the same directory. I do not want to have this data file > as a seperate file, and want to somehow add it to my project so that > it is an embedded resource. > > I can "add" the file to my project, but I can't see how to reference > it now and read the data from it. Again, the file is merely a few > columns of data. > > TIA > > -Raoul
