Software Solutions
Member
- Joined
- Oct 10, 2007
- Messages
- 9
- Programming Experience
- 1-3
I've Seen a Small Programm in which there is a smily face on the screen and when mouse enter in the are of that smily icon that icon randomly moves away from the Cursor but it doesn't move out side from the form, i have written a small program where i try to achieve the goal but sometime it move away from the cursor but sometime it just moves 1 or 2 points
NOTE: Width of The form is 312 and Height is also 312
Dim Rnd as Random
Private Sub picBall_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles picBall.MouseEnter
picBall.Location = New Point(Rnd.Next(Me.Height / 100, Me.Width / 100), Rnd.Next(Me.Height / 50, Me.Width / 50))
Me.Text = "X:" & picBall.Location.X & ", Y:" & picBall.Location.Y
End Sub
Take Care
ENJOY
NOTE: Width of The form is 312 and Height is also 312
Dim Rnd as Random
Private Sub picBall_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles picBall.MouseEnter
picBall.Location = New Point(Rnd.Next(Me.Height / 100, Me.Width / 100), Rnd.Next(Me.Height / 50, Me.Width / 50))
Me.Text = "X:" & picBall.Location.X & ", Y:" & picBall.Location.Y
End Sub
Take Care
ENJOY