一个简单的VB题,。。望解答~~~~~~~~~~~~~~~~~~~

来源:百度知道 编辑:UC知道 时间:2024/05/28 18:16:09
每用鼠标右键点击图像框一次,图像框的高与宽都减小200

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
If Picture1.Width > 200 Then Picture1.Width = Picture1.Width - 200
If Picture1.Height > 200 Then Picture1.Height = Picture1.Height - 200
End If
End Sub

'解答

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
If Picture1.Width > 200 Then Picture1.Width = Picture1.Width - 200
If Picture1.Height > 200 Then Picture1.Height = Picture1.Height - 200
End If
End Sub