gunakkoc
gunakkoc

Reputation: 1069

Using an image including semi-transparent parts as background of a form?

It has been like 4 years I'm having this problem. I kept trying to create a round shaped form. The edges were always messed up. Then I tried to create an image in desired shape and put it in a picturebox and set the background color of the form to green. Then I selected transparency key of the form to green. Again no luck... Now I have this image:

the image

Here is what I always get when I try to use it as a "form".

enter image description here

I don't want to give up since I know it is not impossible, I always see, for example the options windows of games, have that kind of image as a form. So, any solution?

Upvotes: 0

Views: 1418

Answers (1)

Mavamaarten
Mavamaarten

Reputation: 2029

Ahhh, I've been struggling with this for a while too, and after searching a lot I finally found the answer. What you're looking for is called "Layered windows". They don't draw using a Paint event but you can use UpdateLayeredWindow.

There's not that much documentation available online (or at least not for what you're trying to accomplish) but if you need more information you can always PM me (If that's possible on stackoverflow, I'm new here...)

Upvotes: 1

Related Questions