Para ello iremos ala sentencia MOUSEMOVE
Private Sub Button1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseMove
Dim r As New Random()
Dim x As Integer = CInt(Me.ClientRectangle.Right * r.NextDouble()) - 30
Dim y As Integer = CInt(Me.ClientRectangle.Bottom * r.NextDouble()) - 10
Button1.Location = New Point(x, y)
End Sub
No hay comentarios:
Publicar un comentario