How to create an Icon object with multiple images by GDI++ .

  • Thread starter Thread starter Netian
  • Start date Start date
N

Netian

Hello ,
Please teach me how to create an Icon object with multiple images by GDI++ .
I can create an Icon with a image as following , but can't do an Icon with
multiple images.

private Icon ReturnIcon()
{
Bitmap Cbitmap = new Bitmap(32, 32, PixelFormat.Format64bppPArgb);
Graphics gc = Graphics.FromImage(Cbitmap);
//
//draw something on Cbitmap.
//
gc.Dispose();
Cbitmap.MakeTransparent(Color.White);
System.IntPtr icH = Cbitmap.GetHicon();
Icon ico = Icon.FromHandle(icH);
Cbitmap.Dispose();
return ico;
}
 
Mr. Ricky Lee ,
Thank you for your kindness !!
This issue should certainly be settled by your advice soon.

Really, I knew '^o^ "When all doors are closed, God will open a Windows"
^o^'.
 
Back
Top