VB6:picture控件的几个小问题
当鼠标在Picture2移动,picture2的图片改成菜单按钮2.bmp应该怎么写?当鼠标不移动的时候,picture2的图片又变回菜单按钮1.bmpPrivateSu...
当鼠标在Picture2移动,picture2的图片改成 菜单按钮2.bmp 应该怎么写?当鼠标不移动的时候,picture2的图片又变回菜单按钮1.bmp Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
End Sub 展开
End Sub 展开
2个回答
2013-11-13
展开全部
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = LoadPicture(App.Path & "\1.bmp")
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = LoadPicture(App.Path & "\2.bmp")
End Sub
Picture1.Picture = LoadPicture(App.Path & "\1.bmp")
End SubPrivate Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = LoadPicture(App.Path & "\2.bmp")
End Sub
2013-11-13
展开全部
再添加一个timer控件Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture1.Picture = "2.bmp"timer1.enabled=true
End SubPrivate Sub Timer1_Timer()
Timer1.Interval = 500
If Picture1.Picture = "2.bmp" Then
Picture1.Picture = "1.bmp"timer1.enabled=false
End If
End Sub
Picture1.Picture = "2.bmp"timer1.enabled=true
End SubPrivate Sub Timer1_Timer()
Timer1.Interval = 500
If Picture1.Picture = "2.bmp" Then
Picture1.Picture = "1.bmp"timer1.enabled=false
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询