Compiling images into the executable..

wyrd

Senior Contributor
Joined
Aug 23, 2002
Messages
1,405
Location
California
Is it possible to compile bitmaps directly into the executable? I'd hate to tug around an extra 15k file when it's not necessary.
 
Sure. Add it to your project and change it's Compile Action to "Embedded Resource".

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