Compiling images into the executable..

wyrd

Well-known member
Joined
Aug 23, 2002
Messages
1,408
Location
California
Is it possible to compile bitmaps directly into the executable? Id hate to tug around an extra 15k file when its not necessary.
 
Sure. Add it to your project and change its Compile Action to "Embedded Resource".

Then access it like this:
Code:
Image.FromStream([Assembly].GetExecutingAssembly.GetManifestResourceStream("Namespace.filename.ext"))
 
Back
Top