LoadBitmapFromResource

public static Bitmap LoadBitmapFromResource(this Assembly assembly, string imageResourcePath) {
    var stream = assembly.GetManifestResourceStream(imageResourcePath);
    return stream != null ? new Bitmap(stream) : null;
}
Example:
Bitmap bitmap = Assembly.GetExecutingAssembly().LoadBitmapFromResource("Resources.Progress.gif");

Description

Create new Bitmap from resource image

Details

Double click on the code to select all.

 

;