Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在picturebox(VB.NET)中覆盖DrawImage_Vb.net_Drawimage - Fatal编程技术网

在picturebox(VB.NET)中覆盖DrawImage

在picturebox(VB.NET)中覆盖DrawImage,vb.net,drawimage,Vb.net,Drawimage,我有一个程序,用DrawImage在picturebox中绘制图像。这是一个透明的ball.png图像,每秒都会被另一个不同颜色的球覆盖。3-5秒后,由于覆盖,球的边缘变差 在任何覆盖之前,我试图用FillRectangle清除背景,但我需要保留windows窗体背景。我怎样才能做到这一点呢?对于将来会遇到这种情况的任何人: g.Clear(Color.FromArgb(0,0,0,0)); //Clear the graphics with transparent as background

我有一个程序,用DrawImage在picturebox中绘制图像。这是一个透明的ball.png图像,每秒都会被另一个不同颜色的球覆盖。3-5秒后,由于覆盖,球的边缘变差


在任何覆盖之前,我试图用FillRectangle清除背景,但我需要保留windows窗体背景。我怎样才能做到这一点呢?

对于将来会遇到这种情况的任何人:

g.Clear(Color.FromArgb(0,0,0,0)); //Clear the graphics with transparent as background
g.DrawImage(...); //Draw your image