首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

Image 设置了Index 如何做鼠标移动事件

2012-12-14 
Image 设置了Index 怎么做鼠标移动事件Private Sub Image(0)_MouseMove(Button As Integer, Shift As Inte

Image 设置了Index 怎么做鼠标移动事件
Private Sub Image(0)_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

'鼠标移动到Image(0)时 变换图像
Image(0).Picture = Image1(0).Picture

End Sub

Private Sub PictureBox(0)_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

'鼠标离开image,在Picture移动
Image(0).Picture = Image2(0).Picture

End Sub

这个要怎么修改
[最优解释]
Private Sub PictureBox(0)_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

with Image(0)

if x>.left and y>.top and x<.left+.width and y<.top+.height then 
   .Picture = Image2(0).Picture
end if
end with
End Sub


[其他解释]
问题已经解决,进来者有分
[其他解释]
该回复于2012-08-06 15:12:49被版主删除
[其他解释]
该回复于2012-08-06 15:12:40被版主删除
[其他解释]

引用:
Private Sub PictureBox(0)_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

with Image(0)

if x>.left and y>.top and x<.left+.width and y<.top+.height then 
  .Picture = I……


这个是不对的!不过进来就结贴

热点排行