Click here to Skip to main content
16,006,013 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
fjparisIII3-Apr-10 10:46
fjparisIII3-Apr-10 10:46 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
Alan N3-Apr-10 13:32
Alan N3-Apr-10 13:32 
GeneralYour code works (SOLVED) Pin
fjparisIII4-Apr-10 14:36
fjparisIII4-Apr-10 14:36 
AnswerRe: how to programmatically get a list of resource file names in solution explorer Pin
Luc Pattyn3-Apr-10 10:35
sitebuilderLuc Pattyn3-Apr-10 10:35 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
fjparisIII3-Apr-10 10:56
fjparisIII3-Apr-10 10:56 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
Luc Pattyn3-Apr-10 11:06
sitebuilderLuc Pattyn3-Apr-10 11:06 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
fjparisIII3-Apr-10 11:45
fjparisIII3-Apr-10 11:45 
GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
Luc Pattyn3-Apr-10 12:08
sitebuilderLuc Pattyn3-Apr-10 12:08 
code such as:
Module module=type.Module;
Assembly assembly=module.Assembly;
log("Embedded resources for assembly "+assembly.ToString());
string[] sa=assembly.GetManifestResourceNames();
foreach (string s in sa) log("    "+s);


shows a list of embedded resources, i.e. data structures that reside inside an EXE or DLL (in this case the one holding the definition for Type type). The result could be:
Explorer.resources.winLP.jpg
Explorer.resources.LPExplorer.ico

Such information can be used like so to instantiate an object:
Bitmap bitmap=new Bitmap(type, resourceName);
Icon icon=new Icon(type, resourceName);


One way of getting such resources into your EXE/DLL file is by adding image/icon/whatever files to your solution, then setting their "Build Action" property to "Embedded Resource".

Your solution might contain other files as well, those would not become resources and not be listed by GetManifestResourceNames(). EXE and DLL files themselves are not considered resources. Also, you can add any file you want to a solution, even ones not needed for a successful build; and the resulting EXE/DLL typically does not know at all what files were used to get built.

Smile | :)

GeneralRe: how to programmatically get a list of resource file names in solution explorer Pin
fjparisIII3-Apr-10 12:55
fjparisIII3-Apr-10 12:55 
QuestionError: Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized. Pin
Nafiseh Salmani2-Apr-10 22:51
Nafiseh Salmani2-Apr-10 22:51 
AnswerRe: Error: Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized. Pin
Luc Pattyn3-Apr-10 11:30
sitebuilderLuc Pattyn3-Apr-10 11:30 
Questionstrange error "could not load devenv.exe or some of its dependencies" ( Unit testing /unit testing framework/NServiceBus.Testing.Test ) Pin
Tiju John2-Apr-10 3:30
Tiju John2-Apr-10 3:30 
AnswerRe: strange error "could not load devenv.exe or some of its dependencies" ( Unit testing /unit testing framework/NServiceBus.Testing.Test ) Pin
Luc Pattyn2-Apr-10 4:02
sitebuilderLuc Pattyn2-Apr-10 4:02 
AnswerRe: strange error "could not load devenv.exe or some of its dependencies" ( Unit testing /unit testing framework/NServiceBus.Testing.Test ) Pin
Tiju John6-Apr-10 21:04
Tiju John6-Apr-10 21:04 
Questionwho handles error while writing the source code???. Pin
Isaac Gordon1-Apr-10 20:50
Isaac Gordon1-Apr-10 20:50 
AnswerRe: who handles error while writing the source code???. Pin
pdnet1-Apr-10 21:53
pdnet1-Apr-10 21:53 
AnswerRe: who handles error while writing the source code???. Pin
Not Active2-Apr-10 2:02
mentorNot Active2-Apr-10 2:02 
QuestionDoes capFileSaveDIB work Pin
jacket601-Apr-10 9:12
jacket601-Apr-10 9:12 
QuestionHow to get the number displayed in the text which is changing randomly Pin
jaimo1-Apr-10 1:14
jaimo1-Apr-10 1:14 
AnswerRe: How to get the number displayed in the text which is changing randomly Pin
Not Active1-Apr-10 1:39
mentorNot Active1-Apr-10 1:39 
AnswerRe: How to get the number displayed in the text which is changing randomly Pin
jaypatel51211-Apr-10 1:57
jaypatel51211-Apr-10 1:57 
Questionconnection between matlab and Vb6 Pin
G. S. Doiphode31-Mar-10 19:12
G. S. Doiphode31-Mar-10 19:12 
AnswerRe: connection between matlab and Vb6 Pin
Richard MacCutchan31-Mar-10 23:02
mveRichard MacCutchan31-Mar-10 23:02 
AnswerRe: connection between matlab and Vb6 Pin
Dave Kreskowiak1-Apr-10 3:12
mveDave Kreskowiak1-Apr-10 3:12 
QuestionAllow/Disallow a user from changing system time Pin
Aseem Sharma31-Mar-10 17:19
Aseem Sharma31-Mar-10 17:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.