I have been trying to get X,Y coordinates in double (decimal etc) format in C# Form for weeks. I've tried every way, read every almost every question, videos etc but I've could not find any solution for my working (sorry my english).
I can get the mouse coordinates but I want it in double format like X: 12,212 Y: 102,233.
Here is my codes which I tried. Thank you all.
////////////////////////
////////WAY 1 (NOT DOUBLE)///////
//////////////////////
MouseEventArgs me = (MouseEventArgs)e;
Point coordinates = me.Location;
label1.Text = coordinates.X.ToString();
label2.Text = coordinates.Y.ToString();
////////////////////////
////////WAY 2 (NOT DOUBLE)///////
//////////////////////
Point po = e.Location;
label1.Text = po.X.ToString();
label2.Text = po.Y.ToString();
////////////////////////
////////WAY 3 (NOT DOUBLE)///////
//////////////////////
double xCoordinate = e.X;
double yCoordinate = e.Y;
label1.Text = xCoordinate.ToString("0.0#");
label2.Text = yCoordinate.ToString("0.0#");