Overlapping Images with Windows Forms/PictureBox
-
Hello, I am designing a very basic video game, and I want an image to move relative to key presses. This image is on top of a background image. I use picture boxes, however there is a rectangle surrounding the image I wish to move, and it does not look right. Is there a way to make it so that the moving image appears to be part of the background image, so when I move it around? Much like any video game out there with characters that move. Thank you very much :-D Michael L. Allen
-
Hello, I am designing a very basic video game, and I want an image to move relative to key presses. This image is on top of a background image. I use picture boxes, however there is a rectangle surrounding the image I wish to move, and it does not look right. Is there a way to make it so that the moving image appears to be part of the background image, so when I move it around? Much like any video game out there with characters that move. Thank you very much :-D Michael L. Allen
-
Don't use picturebox ,but use Graphics.DrawImage() as it will draw over the back ground and when you call this.Refresh(),It will re paint the back ground and you casn after this call immediatly draw it again in another location.
Is there a specific way to call that function; I have tried this so far:
Bitmap* MyImage; System::String* image = "Resource/wiggle.gif"; MyImage = new Bitmap(image); Graphics* Dr = new Graphics; Dr.DrawImage((dynamic_cast(MyImage)),50,50);
however I get errors. Thank you very much for the help you have given me thus far. Mike