In this blog post I'm going to show you a easy way of doing it. With just two lines of C# codes. Simply you can do this using a MouseHover event. To do that click your button in designer mode and go to events in properties window. Now find the MouseHover event and double click in that. You will get the mouse hover event code. Simply use the below codes to show the text.
1 2 3 4 5 | public void btnTest_MouseHover(object sender, EventArgs e) { System.Windows.Forms.ToolTip toolTip = new System.Windows.Forms.ToolTip(); toolTip.SetToolTip(btnTest, "This is a test text"); } |