开发者

Overwrite DrawImage in picturebox (VB.NET)

开发者 https://www.devze.com 2023-03-06 13:54 出处:网络
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开发者_开

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号