vb中mousemove事件无闪烁移动 10
当在图片上应用mousemove事件时,mouse在移动时,图片总是产生一定的闪烁,怎么才能避免。...
当在图片上应用mousemove事件时,mouse在移动时,图片总是产生一定的闪烁,怎么才能避免。
展开
1个回答
展开全部
这样应该可以解决你的问题:
我给出两个小例子,picture控件的属性都是默认的:
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 0 Then
MsgBox "鼠标在图片上面移动", vbYesNo, "一个试验"
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim aa As Integer
aa = Picture1.Left
If (X > Picture1.Left And X < aa + Picture1.Width) Then
MsgBox "鼠标在图片上面X区域移动", vbYesNo, "一个试验"
End If
End Sub
我给出两个小例子,picture控件的属性都是默认的:
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 0 Then
MsgBox "鼠标在图片上面移动", vbYesNo, "一个试验"
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim aa As Integer
aa = Picture1.Left
If (X > Picture1.Left And X < aa + Picture1.Width) Then
MsgBox "鼠标在图片上面X区域移动", vbYesNo, "一个试验"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询