I am making a level editor for a platform game where the level is set up in a grid type display on a form. At the click of a button the form is supposed to add the image as a pictureBox of the player, an enemy, or whatever. I can successfully do this but when I add in the image on top of the grid my grid image completely disappears underneath it when I made my sprites(player, enemy, etc.) backgrounds transparent I still can't see the grid underneath. Can any one help me.
Asked
Active
Viewed 685 times
2
-
Winforms? DirectX? .Net version? maybe a pic to illustrate how the transarent sprite hides the image underneath? and I'd like some misso soup too – Jeremy Thompson Mar 07 '12 at 03:53
-
It's a form made from Microsoft Visual C# express. I'm not quite sure but I think it's .Net but I know it's not DirectX. The background to the sprite isn't transparant which is the problem even though on the form I set the background color of the picture box to transparent. About the soup, sure I have enough to go around. – Mobianhero Mar 07 '12 at 04:32
-
2see HAns answer here: http://stackoverflow.com/questions/4623165/make-overlapping-picturebox-transparent-in-c-net and see the KB Article, it has ugly code so I advocate the approach not use PictureBox controls but just draw the images in the form's Paint event or resort to WPF or even better XNA – Jeremy Thompson Mar 07 '12 at 04:57
-
@JeremyThompson +1 for XNA. Although it doesn't have a UI editor like Visual C#, a XNA game will end up looking and performing better than any winforms games. You should definitely check it out. – Msonic Mar 30 '12 at 18:08