I was getting bored. So I decided to shoot myself. I created this application.
If you want you can change the picture you want and shoot him/her all day. :)
PS. Requires .NET Framework 4.0
Here is the source code for the program :
1: Public Class Form1
2:
3: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
4: 'The form loads and the nongrami(dirty business) starts
5: tmrForChange.Enabled = True
6: Me.Cursor = New Cursor(Application.StartupPath + "\crosshair.cur")
7: End Sub
8: Dim tmrCountr As Int16 = 0
9:
10: Private Sub tmrForChange_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrForChange.Tick
11:
12: Dim newLocation As Point = New Point(0, 0)
13: If tmrCountr <= 5000 Then
14: tmrCountr += 1000
15: Else
16: tmrCountr = 0
17: Dim random As New Random()
18:
19: newLocation.X = random.Next(mainPanel.Width - targetPanel.Width)
20: newLocation.Y = random.Next(mainPanel.Height - targetPanel.Height)
21: targetPanel.Location = newLocation
22: 'tmrForChange.Enabled = False
23: End If
24:
25: End Sub
26: Dim countr As Integer = 0
27: Private Sub targetPanel_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles targetPanel.MouseClick
28:
29: countr += 1
30: countLabel.Text = countr
31: End Sub
32:
33: End Class
Sarthak Ganguly
Download Code |
Comments
Post a Comment
No spam please :)