How to get mouse cordinates when my mouse click somewhere?I want to retrieve the mouse pointer's x , y cordinates when my mouse clicks anywhere in the screen , it should be independent of windows form .
ex. if i click mouse in notepad it should give me cordinates , i tried following but it gives cordinated only when i clicked in myform.
private void Form1_MouseClick(object sender, MouseEventArgs e)
//string x_cord = Cursor.Position.X.ToString();
//string y_cord = Cursor.Position.Y.ToString();
//MessageBox.Show("cordinates are " + x_cord +","+ y_cord);
please suggest me way out of this issue.