VB保存图片问题

来源:百度知道 编辑:UC知道 时间:2024/05/08 11:06:50
我用Line方法画了图片,我想让他保存,让保存名称是当前的日期,请问有可能吗?谢谢,或着怎么能自己选择保存路径谢谢`

Private Sub Form_Click()
' 声明变量。
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