I am trying to get and show an icon on Windows Forms from a Blender file's preview icon.
I can only get Blender's default icon with Icon.ExtractAssociatedIcon but not the preview image that Blender makes when a Blender file is saved.
string imagePath = @"C:\tmp\Cube.blend";
Icon icon = Icon.ExtractAssociatedIcon(imagePath);
if(icon != null)
{
var bitmapIcon = icon.ToBitmap();
pictureBox1.Image = bitmapIcon;
}
I would like to get the preview icon to show in Windows Forms pictureBox if that is even possible.