We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,608 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Transparency and Picture Boxes

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.

2
Contributors
1
Reply
2 Months
Discussion Span
3 Months Ago
Last Updated
2
Views
Quinncunx
Newbie Poster
19 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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.

Oxiegen
Master Poster
761 posts since Jun 2006
Reputation Points: 87
Solved Threads: 148
Skill Endorsements: 5

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0566 seconds using 2.68MB