Introduction
At a time I am working in an application in that I need to show current cursor
position that do not occupying the screen. So I found this concept that contains
a simple logic to show the position in taskbar. this concept will help those who
are working to get the current cursor position for some purpose. Normally we
have some space to show position of the cursor. it may be not optimal in some
case. So we can show it in taskbar.
Concept behind the approach:
In this concept we can show the cursor position through Icon of the task. Here
we convert the text of cursor position to an Icon. And the Icon further assign
to icon of the task.
C# Code behind the approach:
Timer timer = new Timer(); // Create a Timer
timer.Interval = 100; // Have some interval to tick
timer.Start(); // Start the process
timer.Tick += timer_Tick; // Hook the event
void timer_Tick(object sender, EventArgs e)
{
var xValue = "x :"+ Cursor.Position.X .ToString(); // Get the Value of cursor's x value
var yValue = "y :" + Cursor.Position.Y.ToString(); // Get the Value of cursor's y value


Join the conversation! Your thoughts help the community grow.