Tag: ToolTip

Sample C# code for adding ToolTip for a control

The following C# code snippet shows you how to set the tooltip for any control in a windows application. Just call this function in the Form_Load event or the constructor.

private void SetControlToolTips()
{
ToolTip toolTip = new ToolTip();
toolTip.SetToolTip(this.btnPlay, "Play");
toolTip.SetToolTip(this.btnStop, "Stop");
toolTip.SetToolTip(this.txtBox1, "Enter Name");
}