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.
Code
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();
}
0 comments:
Post a Comment