Sep 28, 2016

[Fixed Solution] Show A Message When Mouse Hovers Over A Button In Windows Forms Application

In a windows forms application, sometimes you may wanted to show a mouse hover text on it, just like in web application. The easy way to do it is using a tool tip. 

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");
}

No comments:

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...