O
ORC
Hi,
I have made a custom control - a button that is able to show an image. The
image can have a transparent background and is sometimes placed halfway on
top of another control.
Following is part of the code that is placed in the 'OnPaint' event:
ImageAttributes imageAttr = new ImageAttributes();
imageAttr.SetColorKey( bitmapTransparentColor, bitmapTransparentColor);
e.Graphics.DrawImage(image, imgRect, 0, 0, image.Width, image.Height,
GraphicsUnit.Pixel, imageAttr);
But the part that is transparent isn't updated / painted - what have I
missed?.
Thanks - your respons is highly appreciated
Ole
I have made a custom control - a button that is able to show an image. The
image can have a transparent background and is sometimes placed halfway on
top of another control.
Following is part of the code that is placed in the 'OnPaint' event:
ImageAttributes imageAttr = new ImageAttributes();
imageAttr.SetColorKey( bitmapTransparentColor, bitmapTransparentColor);
e.Graphics.DrawImage(image, imgRect, 0, 0, image.Width, image.Height,
GraphicsUnit.Pixel, imageAttr);
But the part that is transparent isn't updated / painted - what have I
missed?.
Thanks - your respons is highly appreciated
Ole