|
-
April 10th, 2009, 09:15 PM
#1
Do windows forms do partial transparency?
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:

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?
-
April 11th, 2009, 01:15 AM
#2
Re: Do windows forms do partial transparency?
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?
-
April 12th, 2009, 03:42 AM
#3
Re: Do windows forms do partial transparency?
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
-
April 12th, 2009, 08:04 PM
#4
Re: Do windows forms do partial transparency?
I may be missing the problem. I didn't have any trouble simply overriding OnPaint() and drawing the image directly:

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.
-
April 13th, 2009, 11:41 AM
#5
Re: Do windows forms do partial transparency?
 Originally Posted by cjard
If 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 ?
Last edited by JonnyPoet; April 13th, 2009 at 01:28 PM.
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|