vb鼠标指到image时图片变大,移走后图片还原
1个回答
展开全部
Dim s(3) As Single
Private Sub Form_Load()
With Image1
.Stretch = True
s(0) = .Left
s(1) = .Top
s(2) = .Width
s(3) = .Height
End With
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
With Image1
If .Left <> s(0) Then .Move s(0), s(1), s(2), s(3)
End With
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
With Image1
If .Left = s(0) Then .Move .Left - 300, .Top - 150, .Width + 600, .Height + 300
End With
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询