Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedded Source

Status
Not open for further replies.

zackiv31

Programmer
May 25, 2006
148
US
So I embedded an exe using Visual Studio. (By changing it's properties to embedded), but when I try to access the resource in the code, it doesn't appear in the list. I have three embedded files, two pics and this exe, but only the pics showup in the list...

I'm accessing them this way:

myProject.Properties.Resources.(name here)

What am I doing wrong?

This is the error I get:
Error 1 Source file 'C:\Documents and Settings\me\My Documents\Visual Studio 2005\Projects\File Test\File Test\Resources\my.exe' could not be opened ('Unspecified error ') File Test
 
if you use the one that VS made for you when you started the project then you should be able to access it by
Code:
myapp.Properties.Resources.MyResourceName
does it not appear in the list after you type Resources. ??

Age is a consequence of experience
 
This is usually a naming problem.

Use Reflector (or Ildasm.exe) to examine your compiled assembly for embedded resources. First, make sure it's really there. Second, look at what it's called, and use that name in your code.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top