C# button with *.png image over another button with *.png image not showing correctly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NVergunst
    New Member
    • Apr 2007
    • 18

    C# button with *.png image over another button with *.png image not showing correctly

    Hello all.

    I have what I hope is an easy problem, but I am not sure.

    What I have is a bunch of buttons with their images (not background images, but images) set to *.png files with transparency. If I have a button over the form's background, it displays perfectly. I get the transparency and everything to show.

    The problem comes when 2 buttons overlap. The part of the *.png that should be transparent to what is underneath it, seems to render as if the form's background was directly below it. Then the second button, is chopped off. If it is below for example a completely transparent png, it will be hidden and not show at all.

    What I need to do is be able to voerlap these buttons. I can change them to PictureBoxes if that is what I need to, but that would require a fair bit of code changes right now, so I would like to try and feel out some answers to see if that is possible.

    Is there some workaround to this? Is this normal? Is there some option I can set to have it not do this?

    Thankyou in advance for all your help.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    I believe this is a design issue but may be coded around by making the completely transparent image visible = false. HTH.

    Comment

    • NVergunst
      New Member
      • Apr 2007
      • 18

      #3
      Originally posted by kenobewan
      I believe this is a design issue but may be coded around by making the completely transparent image visible = false. HTH.
      Well in normal use, there wont be a fully transparent image. I was just using one to try out what was going wrong.

      So you believe this is the way C# is coded? No other workaround? Perhaps draw everything to some grpahic layer make that the background, and then draw transparent button overlays?

      Comment

      • booies
        New Member
        • Jun 2007
        • 2

        #4
        Hey NVerngunst. I'm having a similar problem with .pngs. In fact its exactly the same. Did you ever find a way around it?

        Comment

        Working...