Answer,设置PictureBox的AutoReDraw属性为True即可。
--------------------------------------------------------------------
Made by Thirdapple's Studio(http://3rdapple.51.net/)
--------------------------------------------------------------------
Made by Thirdapple's Studio(http://3rdapple.51.net/)
' 声明变量。
Dim CX, CY, Limit, Radius as Integer, Msg as String
ScaleMode = vbPixels ' 设置比例模型为像素。
AutoRedraw = True ' 打开 AutoRedraw。
Width = Height ' 改变宽度以便和高度匹配。
CX = ScaleWidth / 2 ' 设置 X 位置。
CY = ScaleHeight / 2 ' 设置 Y 位置。
Limit = CX ' 圆的尺寸限制。
For Radius = 0 To Limit ' 设置半径。
Circle (CX, CY), Radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
DoEvents ' 转移到其它操作。
Next Radius
Msg = "Choose OK to save the graphics from this form "
Msg = Msg & "to a bitmap file."
MsgBox Msg
SavePicture Image, "TEST.BMP" ' 将图片保存到文件。
End Sub
才能保存图片,只是做图时如不刷新是全图作完后一次性全显示出来,不是一点
一点的画,
更改过的图片,要引用picturebox的image属性,picture里面保存的是原始图片。
renjunjun(飞黄) 和thirdapple(第三只苹果)都是对的.我试过up
Autoredraw=True
SavePicture时要用Image属性,Picture是原始图片,不包含绘制的图形。
.AutoRedraw = True
.DrawWidth = 20 '可以设置线条的粗度
Picture1.Line (0, 0)-(1500, 1500) '我瞎写的
End With
SavePicture Picture1.Image, "as.bmp"