Private Sub Command2_Click()
SavePicture p1.Image, "c:\windows\desktop\dd.bmp"
End Sub
Private Sub p_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
CutYn = True
cutox = X
cutoy = Y
End Sub
Private Sub p_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If CutYn = True Then
s.Left = cutox
s.Top = cutoy
s.Width = X - cutox
s.Height = Y - cutoy
End If
End Sub
Private Sub p_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
cutnx = X
cutny = Y
p1.Width = cutnx - cutox
p1.Height = cutny - cutoy
CutYn = False
End Sub