Got .PNG file. Want embeddded icon resource displayed as icon on form title bar

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());
        }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)