How to make the "flying ball" to be in the front ?
-
Hello! I've made a animation of ball, flying on the form, from the edge to edge. But i've put a PictureBox,and the ball isn't seen anymore. It is flying in the backwards of my picttureBox. I've tryed to
BringToTheBack
the pictureBox, but it is not working. What should i do?One nation - underground
-
Hello! I've made a animation of ball, flying on the form, from the edge to edge. But i've put a PictureBox,and the ball isn't seen anymore. It is flying in the backwards of my picttureBox. I've tryed to
BringToTheBack
the pictureBox, but it is not working. What should i do?One nation - underground
AFAIK you can do nothing, since the PictureBox is a Control of the Form and you cannot overwrite its area when drawing inside OnPaint. As workarounds you can: (1) use a another PictureBox to represent the bouncing ball. or (2) Build a customized PictureBox (deriving from the original one), and override the paint method to make it aware of the overlapping ball. hope that helps. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.