On Mon, 12 May 2008 13:43:38 -0700, Paul E Collins
<fi******************@CL4.orgwrote:
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote:
>That is also possible, in this case you would have to convert it to a
bitmap:
myPictureBox.Image = Bitmap.FromHicon(SystemIcons.Hand.Handle);
But then you lose the transparent background and get ugly black edges.
Really? That's annoying. I would have expected FromHicon() to include
alpha in the new Bitmap so that the transparency isn't lost.
One _should_ still be able to do it though, by making a regular 32bpp
Bitmap, clearing it with Color.Transparent, and then drawing the icon into
it with DrawIcon(). Then you only have to do it once, rather than
overriding OnPaint() or handling the Paint event.
Pete