Here is an updated Picture1_MouseMove that should be a bit more accurate:
Nifty Idea on how to handle this problem though.Code:Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Form1.Cls If (X + Picture1.Left > Command1.Left And Y + Picture1.Top > Command1.Top) And _ (X + Picture1.Left < Command1.Left + Command1.Width) And _ (Y + Picture1.Top < Command1.Top + Command1.Height) Then Print "Mouse moved over button (through PictureBox)" Else Print "Mouse Moved over Picturebox" End If End Sub




Reply With Quote