Overwrite DrawImage in picturebox (VB.NET)
I've a program that draw an image in a picturebox with DrawImage. This image, a ball (.png transparent), every second is overwritten by another ball of different color. After 3-5 second the e开发者_开发技巧dge of the ball becomes bad, because of overwriting.
I tried to clean the background with a FillRectangle before any overwrite, but i need to preserve the windows form background. How can i do that?
To anybody who will encounter this in the future:
g.Clear(Color.FromArgb(0,0,0,0)); //Clear the graphics with transparent as background
g.DrawImage(...); //Draw your image
精彩评论