0
How to use MouseHover and MouseEnter/Leave?
Dear Sir/Madam, I'm currently learning the basics of csharp and I stumbled upon a task in which I have to make a small program that shows a text in a textbox, once you hover over a button. Every next time you hover it must show the previous text + #, as a way to count the amount of times you hover. Now I've struggling with this task for about a few hours today and yesterday and even with the help of Google, I haven't been able to figure it out. Is there anyone overhere willing to explain this basics step to me? :] Kind regards, Samuel
3 Antworten
0
Winforms or WPF
0
Windows forms app (.NET Framework)
If That's what you meant ..
0
Thank you.
MouseHover
MouseEnter
MouseLeave
Are events like ButtonClick
you'll find them in the Properties window events tab (marked by the lightning sing)
See this youtube video at 4.24
https://www.youtube.com/watch?v=hvSvEXxVCFA
(sound is really poor, but visual it is good)
Double click to add a eventhandler
First start with code like
private void pic_MouseHover(object sender, System.EventArgs e)
{
Showmessage("MouseHover event");
}
More info
http://www.java2s.com/Code/CSharp/Event/MouseHoveraction.htm