-3

This is my question as a beginner programmer. I have a C# form application. I want to show a message while mouse cursor is waiting on a label, a textbox or a button. How can I do that?

Thanks in advance

4
  • 1
    Use MouseHover event Commented Feb 1, 2017 at 11:42
  • have a look at the Mouse events of the controls Commented Feb 1, 2017 at 11:42
  • 3
    @M.kazemAkhgary " its good question" - actually not so much. It doesn't show much effort and an answer that would completely explain how to do it would be rather long. (Did not DV myself) S.Abbak: There is a little manual on writing Questions on SO: How to Ask. Commented Feb 1, 2017 at 11:46
  • 1
    What have you tried so far? The functionality you're looking for is called "ToolTip", you can use that keyword to find more on the subject. Possible duplicate of stackoverflow.com/questions/168550/… Commented Feb 1, 2017 at 11:48

1 Answer 1

2

You can either use mouse events or register a ToolTip for the object like this:

 ToolTip toolTip1 = new ToolTip();

 // Set up the delays for the ToolTip.
 toolTip1.AutoPopDelay = 5000;
 toolTip1.InitialDelay = 1000;
 toolTip1.ReshowDelay = 500;

 // Set up the ToolTip text for the Button.
 toolTip1.SetToolTip(this.button1, "Hey it works!");
Sign up to request clarification or add additional context in comments.

2 Comments

"First of all I don't think this should be downvoted since he is a beginner, at least say why you downvoted." - That part should be a comment.
Thank you very much. It worked :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.