C# Programming
07-07-2009, 08:10 PM
I have a class called "Card" (as in a deck of cards), which extends the PictureBox class. Now the picturebox is the size of the image (150X215). When you mouse over the card it "hovers" (its Y ******** decreases 20 pixels) and is supposed to show part of the card underneath it. However this does not happen. See this picture: http://img199.imageshack.us/i/cardsj.jpg/[^ (http://img199.imageshack.us/i/cardsj.jpg/)]
I've done this in the OnLoad event of the Card class:
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent;
But it doesn't work (as you can see in the picture). I found this article: http://www.codeproject.com/combobox/TransListBox.asp[^ (http://www.codeproject.com/combobox/TransListBox.asp)]
But how do I do this in C#?
BTW the images are transparent png's.
I've done this in the OnLoad event of the Card class:
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
this.BackColor = Color.Transparent;
But it doesn't work (as you can see in the picture). I found this article: http://www.codeproject.com/combobox/TransListBox.asp[^ (http://www.codeproject.com/combobox/TransListBox.asp)]
But how do I do this in C#?
BTW the images are transparent png's.