1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Private Sub Panel1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseEnter
Me.Panel1.Location = (New Point(129, 25))
End Sub
Private Sub Panel1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseLeave
Dim pt As Point = Me.PointToClient(New Point(Me.MousePosition.X, Me.MousePosition.Y))
'le test
If (pt.X > (Me.Panel1.Width + Me.Panel1.Location.X)) _
Or (pt.X < Me.Panel1.Location.X) Or (pt.Y > (Me.Panel1.Height + Me.Panel1.Location.Y)) _
Or (pt.Y < Me.Panel1.Location.Y) Then
Me.Panel1.Location = (New Point(685, 25))
End If
End Sub |
Partager