private sub form_load()
image1.picture="c:\1.bmp" '启动时装入一张图片1
end sub
Private Sub image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
image1.picture="c:\2.bmp" '鼠标移到上面变成图片2
end sub
Private Sub image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
if Button=1 then image1.picture="c:\3.bmp" '鼠标按下变成图片3
end sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
image1.picture="c:\1.bmp" '鼠标移开还原图片1
end sub
Option Explicit
Dim picA As Boolean
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If picA = True Then
Image1.Picture = LoadPicture("d:\b.jpg")
picA = Not picA
End If
End Sub
Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If picA = False Then
Image1.Picture = LoadPicture("d:\a.jpg")
picA = Not picA
End If
End Sub