This was an interview question. Given Visual Studio 2008 and an icon saved as a .PNG file, they required the image as an embedded resource and to be used as the icon within
Fire up VS, start new Windows Application. Open the properties sheet, add the .png file as a resource (in this example: glider.png ). From hereon, you can access the resource as a Bitmap file as WindowsFormsApplication10.Properties.Resources.glider
Code for using it as an application icon:
public Form1()
{
InitializeComponent();
Bitmap bmp = WindowsFormsApplication10.Properties.Resources.glider;
this.Icon = Icon.FromHandle(bmp.GetHicon());
}