+92 332 4229 857 99ProjectIdeas@Gmail.com

Form Mouse Enter Event (C#.net)

Form Mouse Enter Event:
The following code shows you form mouse enter event, from what location your mouse entered in form, it shows you x-axis and y-axis of that entering location of mouse. and display in label.


private void Form1_MouseEnter(object sender, EventArgs e)
 int x = this.Location.X;
 int y = this.Location.Y;
 label1.Text = "X-Axis Position:" + x.ToString() + "Y-Axis Position:" + y.ToString();