VB 鼠标经过PictureBox 时更换为另一个图像 怎么写
我想要用VB实现 鼠标进入PictureBox时更换为另一个图像离开是又返回原来的图像就是要实现PictureBox的鼠标悬停效果高手速...
我想要用VB实现 鼠标进入PictureBox 时更换为另一个图像离开是又返回原来的图像就是要实现PictureBox的鼠标悬停效果高手速度。。。在线等。。。。
展开
2个回答
展开全部
为了避免连续触发:
dim HasChanged as boolean
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
if HasChanged then
Picture1.Picture = LoadPicture(App.Path & "\2.jpg")
HasChanged=false
end if
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
if not HasChanged then
HasChanged=true
Picture1.Picture = LoadPicture(App.Path & "\1.jpg")
end if
End Sub
dim HasChanged as boolean
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
if HasChanged then
Picture1.Picture = LoadPicture(App.Path & "\2.jpg")
HasChanged=false
end if
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
if not HasChanged then
HasChanged=true
Picture1.Picture = LoadPicture(App.Path & "\1.jpg")
end if
End Sub
展开全部
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = LoadPicture(App.Path & "\2.jpg")
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = LoadPicture(App.Path & "\1.jpg")
End Sub
Picture1.Picture = LoadPicture(App.Path & "\2.jpg")
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = LoadPicture(App.Path & "\1.jpg")
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询