1,105,416 Community Members

Transparency and Picture Boxes

Member Avatar
Newbie Poster
19 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]

Maybe I am missing something, but is it the case that when you set a pictureboxes background to transparent, all it really does is set it to the same color as the forms background?

What I am trying to do is draw an animation for the benefit of this, a bouncing ball - which I paint on the form, then overlay that with a picture frame. End result should be a bouncing ball in a picture frame.

I have tried:

1.-Setting the picture box background to pink and then key out the same pink, this basically cuts away everything, including that which is behind the picture box
2. -Setting the picture box to transparent, this just displays the picture box background as the same color as the forms background.
3. I have tried painting the image in a rectangle, this had the same effect as drawing it in a picture box.

I am not sure what I am doing wrong, I am wondering if there is any other ways I could try or if someone has made a custom control or library that supports transparency?

EDIT: I should also mention the picture frame is not even, so I cannot use 4 seperate images arranged as a frame.

Member Avatar
Master Poster
765 posts since Jun 2006
Reputation Points: 88 [?]
Q&As Helped to Solve: 149 [?]
Skill Endorsements: 7 [?]

Have you tried using the image as the forms background, instead of using pictureboxes?
Unless, of course, you're using the background to draw the ball.
That would be the reason for why the ball is behind the picturebox instead of on top of it.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
Tags Related to this Article