Using this event the label just disappears, how should I do this?
private void label4_MouseMove(object sender, MouseEventArgs e)
{
label4.Location = new Point(Cursor.Position.X, Cursor.Position.Y);
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The location of
label4is relative to the container (Formor parent control), Cursor position may be relative to the screen.You need to adjust the location. For example, if the container is the
Formyou can find its location in the screen and calculate by it the location of the cursor relative to screen.This is only one possibility for the cause, but this one is happens a lot 🙂