Is there any way I could get a jpg images in a dll file?
I'm not new to C#, but I only know the basic things and wondering if this is possible and how.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bechir BejaouiPosted Mar 9, 2009, 1:01 PM
first step:
add your image or any type of ressource like text file and other none applicative(dll,exe) objects to a resx file, this article will help you to perform that
http://www.c-sharpcorner.com/UploadFile/yougerthen/105262008135822PM/1.aspx
second step:
Complie this resx file to dll
start>All programs>Micrsoft visual studio>Microsoft visual studio tools> Command prompt
then execute the command
csc /out: myAssembly.dll /target:library /res:
Bechir BejaouiPosted Mar 17, 2009, 11:51 AM
http://support.microsoft.com/kb/309158
same thing could be said concerning avi files
MichaelPosted Mar 14, 2009, 6:08 PM
And got the loading part already working.
Bechir BejaouiPosted Mar 14, 2009, 4:01 PM
MichaelPosted Mar 9, 2009, 2:35 PM
Also, how can I add the picture directly to a picturebox? I can't get that working.
And, can I put any files in a resx/dll file? I would like also to put a mp3 and wma file in it, but it returns a error, like also stated on that article.
I currently have:
Assembly h = Assembly.LoadFile(System.Environment.CurrentDirectory +"\\PHD.dll");
Stream s = h.GetManifestResourceStream("test.rsx");
But how do I get the image now?