Dim oldx As Single
Dim oldy As Single
Dim bg As Boolean
Private Sub Form_Load()
Picture1.AutoRedraw = True
bg = True
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then '当鼠标左建按下时发生
If bg = False Then
Picture1.Line (oldx, oldy)-(X, Y)
End If
oldx = X
oldy = Y
bg = False
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
bg = True
End Sub
Private Sub Command1_Click()
Picture1.AutoRedraw = False
Set Picture1.Picture = Picture1.Image
SavePicture Picture1.Picture, App.Path & "\123.bmp"
End Sub
可以做个隐藏画面。将你需要保存的Picture画像重绘到该画面上。然后Print该画面。利用API截取图片或者另存。