Thursday , 24 May 2018
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)
{

}

}
}

Check Also

Asp.Net LogIn and CreateUserWizard Controls

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