Friday , 24 February 2017
Home » .NET » How to get current cursor position in C#.net

How to get current cursor position in C#.net

How to get cursor position in C#

In future if you are working on any Game Development project or any project where you need to find the current cursor position, this simple program might help you.

CropperCapture[1]

 

Code(.cs file) : 

namespace CursorPosition
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

this.MouseMove+=Form1_MouseMove;
}

void Form1_MouseMove(object sender, MouseEventArgs e)
{
cursorPositionLabel.Text = e.Location.ToString();
}

private void Form1_Load(object sender, EventArgs e)
{

}

}
}

About Vinayak Bamane

MCA from IMCOST College. Works as a Software Specialist with eClinicalWorks. Programming Worm, Trek lover, Rock Climber, Game Addict, Volleyball Player and happy to be with Amazing Things : )

Check Also

Asp.Net LogIn and CreateUserWizard Controls

 Title : Asp.net Log In and CreateNewUser Control Description :  Whenever we wanted to develop …

Leave a Reply

Your email address will not be published. Required fields are marked *