How do Embed a file as a resource?

M

M

Hi Folks,

Does anyone know how to embed a file into a resource in C#? You
seem to be able to embed Icon, Bitmap, Cursor's & Strings. But how do you
embed a file???



In VC++ version 6 you would, Find the Resource, Load It, get its size, and
then write it out to where ever you want it.



Any help would be most appreciated.



Cheers,



Martin
 
M

Miha Markic

Hi M,

Select file in Solution Explorer, go to Properties and set Build Action to
Embedded Resource.
 
M

M

Hi Miha Markic,
Select file in Solution Explorer, go to Properties and set Build Action to
Embedded Resource.

AND ????????

How do I Serialize it out?????

The Icon Bitmap & Cursor Classes ALL have special constructors ie
Class(GetType(),"FileName");

If the file was for instance an MS-Access Database file, how do you copy it
to the required location????

Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top