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

The suffocating roadblocks and dead end jobs

Life throws new challenges everytime you decide to do something new.

When you plan to try anything new, you area aware of the challenges that you are likely to face. But Life usually will have other plans. When you expect a right turn, Life will show you a left. When you least expect x to turn up at your door, you find y.

And then there is a dead end job.

This is one job that I at times enjoy. Because I get to work directly in the technologies that I like to work with. At the same time, I feel terrible about the senior management and my future prospects here. What is the worst is that I don't see any way out of this either.

It is not that I have not forwarded my resume over to the other firms. I have. But I have not received any meaningful reply yet. Any response that I have so far been able to elicit are of no interest to me whatsoever.

I feel I have to chalk out a path for myself again. Problem is, the task becomes more and more difficult with age. I can take less risk than I c…

A Good Day

I have a beautiful small house in the hills. It is about 3 km from Manali, in Himachal Pradesh. It is not much. Probably calling it a cottage is stretching it too far. I have got a couple of bedrooms, a small drawing room cum kitchen where we dine as well. There is storage and a small garage that is mostly empty. I have got another small room with just a single bed and a study built on the first floor. It is just about ten feet by ten feet but it has got a retractable ceiling and a wall made of glass with the rest of the roof being something of a balcony. This is the place where I like to spend most of my time.
In the front, there is a garden with some flowers in the front and trees lining the boundary wall. My mother has planted a few vegetables in the back that we regularly use in the kitchen. We mostly require only rice and eggs from the market.

A typical day starts with me waking up and going for a morning stroll. I often spend my nights in the room on the roof. So the first thing I…

My Little Wife

Amar choto bou chole bake bake... If you are looking for some meaning in the words written above - please stop. It is of no use.

This is a short dedicated to my wife whom I did not get to marry.

Being typically Bengali, she is puchu to me.

If you are reading this, please keep in my mind that I am not one bit drunk. And I don't particularly feel like writing either. This you see here is not prose. Just an open faucet. Or a gaping wound sp... okay. Scratch that. Open faucet it is.

She has got a small round face. Her eyes are symmetrical. A bit like almonds. They look lively and restless when open and calm or serene when closed. The nose is neither pointed not large. It sits right in the middle of the face with even elevations on both sides. It is not too small to notice nor is it too large to get in the way. Her lips are small, but not thin. There is an amount of volume to them that you would not usually expect.

Her face looks normal something from a distance. It looks small from c…