-
Hi, I've been experimenting using picture boxes in an array.
The program serves no purpose other than to teach me about arrays.
What happens is when the mouse moves over one of the picture
boxes, the border style is changed to 1 and the other
picture box borders all change to 0.
It seems to work ok, but everytime the mouse moves one pixel
on the button all of the code for that mouse move event will
execute again. Is there anyway for my program to know that
even though the mouse has moved it is still over the same
button, so the code will not execute until the mouse has moved to another picture box.
thanks in advance
MICK
-
Try to make it sorta "memorize" the last index of the picture it moved over. :rolleyes:
Something like this should work:
Code:
Private Sub Picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Static iLastIndex As Integer
If iLastIndex = Index Then Exit Sub
iLastIndex = Index
' Put all the rest of your MouseMove code here.
End Sub