Skip to main content

ShootMe

 

I was getting bored. So I decided to shoot myself. I created this application.


image


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


 






dl_arrowDownload Code

Comments

Popular posts from this blog

Stalingrad 2013 Movie Review

I saw the trailer of this movie once and really really liked it. What was really interesting was the Thomas Kretschmann acted in a movie with the same name exactly 20 years back. Stalingrad was released in 1993 and the young Kretschmann played the role of a dutiful but conscientious German leutnant of the ill fated 6th Armee. Here also he comes back, slightly older and rugged. The spectacular visuals, the background sound and the lack of background music makes it a realistic watch. That is all positive that I have to say about this trash. Yes, that's what I will this. Naturally, while watching this I brought in similar scenes of Stalingrad (1993) among other war movies. And in comparison this movies cuts so sorry a figure that I dared not watch the entire movie even! The story starts of slow enough and just completely refused to pick up pace. The entire movie seemed to be directed by an amateur school student, bolstered by some insanely talented special effects team. This made t...

Bangalore - Where I now live!

Life in Bangalore Bangalore or Bengaluru is one of the strangest places I have ever been. First, I'll call it Bangalore. In any case I am not really fond of this place, and the official name just makes me go nuts. Literally! Bangalore techie in action! Lets start with the good things in Bangalore. The advantage is that for me there ain't much good here so this paragraph is going to be short! Bangalore has excellent weather, inspite of not being the hills. Weather in Bangalore is always temperate, with the mercury hovering from 68 and 78 Fahrenheit. So yeah, unlike in other Indian metro cities, here we don't have to sweat. Electricity costs are also cut down because we don't need air conditioners or even fans. The other good thing about Bangalore is its vicinity to various tourist spots in South India. Be it the Nilgiris or the Malabar, Konkan or Goa, all are within reach and easily. Seriously??? Now lets begin the negative aspects of the city. I will ment...

Getting back to making stuff

I was off for a while. I mean, I was not. I painted an old shoecase that now looks a gorgeous white cupboard. I fixed my bicycle.  But beyond this, I did not do much beyond what my work paid me to do. So here I am, about to touch a new year of my life - and I am itching to get back into the habit of writing again.  Not just writing stuff here, but also making applications or music.  In fact, after a very long time I feel like sketching again. I think I am going to sketch my wife. Or may be finish my ex wife's sketch. I dunno. But I am gonna get started with a pencil tomorrow. Thanks to chatgpt, I have restarted my application brainstorming and dusted my old Github repos.  I think this is going to be a good run this time.