Click to See Complete Forum and Search --> : Do windows forms do partial transparency?


cjard
April 10th, 2009, 09:15 PM
I have here an image of a box, with a drop shadow that is varying transparency - near the box, the shadow is nearly opaque,, near the edge it is nearly transparent:

http://th03.deviantart.com/fs26/300W/i/2008/111/e/f/Drop_Box_Icon_by_2Shi.jpg

Can this be rendered onto a form such that it appears with all its transparency? The best Ive managed so far is setting the backcolour and transparencykey of the form to lime green, but the dropshadow is rendered opaque. Setting the back/transkey to black does neaten things up a little by obliterating the dropshadow entirely..

It it possible to render this in all its nicely partially transparent glory?

BigEd781
April 11th, 2009, 01:15 AM
I would try, but the image was saved as a jpg, so there is no alpha channel. Can you save it as a png or gif?

cjard
April 12th, 2009, 03:42 AM
Download it here:

http://2shi.deviantart.com/art/Drop-Box-Icon-83426299

Thanks!

Note that the jpeg is a preview, you download a zip file with a PNG and an ICO in the top left of the page

BigEd781
April 12th, 2009, 08:04 PM
I may be missing the problem. I didn't have any trouble simply overriding OnPaint() and drawing the image directly:

http://i227.photobucket.com/albums/dd217/biged781/delete-74.png

I think that I can help as I have a fai amount of experience with this kind of thing, but perhaps you could give me some more information on the problem you are having.

JonnyPoet
April 13th, 2009, 11:41 AM
Download it here:

http://2shi.deviantart.com/art/Drop-Box-Icon-83426299

Thanks!

Note that the jpeg is a preview, you download a zip file with a PNG and an ICO in the top left of the pageIf you are using the ICO file for drawing then you will simple get the box nothing else.
---- edited ----
I tried it, but I can only access the 32x32 icon even there is a 256x256 XP item included. But how to access the correct icon in this file ? BigEd781 Maybe show the code how to read out the correct icon or if you used the png, how to do this ?