How to: Set ToolTips for controls on a Windows Form at design time
You can set a ToolTip string in code or in the Windows Forms Designer in Visual Studio. For more information about the ToolTip component, see ToolTip Component Overview.
Set a ToolTip programmatically
Add the control that will display the ToolTip.
Use the SetToolTip method of the ToolTip component.
' In this example, Button1 is the control to display the ToolTip. ToolTip1.SetToolTip(Button1, "Save changes")
// In this example, button1 is the control to display the ToolTip. toolTip1.SetToolTip(button1, "Save changes");
// In this example, button1 is the control to display the ToolTip. toolTip1->SetToolTip(button1, "Save changes");
Set a ToolTip in the designer
In Visual Studio, add a ToolTip component to the form.
Select the control that will display the ToolTip, or add it to the form.
In the Properties window, set the ToolTip on ToolTip1 value to an appropriate string of text.
To remove a ToolTip programmatically
Use the SetToolTip method of the ToolTip component.
' In this example, Button1 is the control displaying the ToolTip. ToolTip1.SetToolTip(Button1, Nothing)
// In this example, button1 is the control displaying the ToolTip. toolTip1.SetToolTip(button1, null);
// In this example, button1 is the control displaying the ToolTip. toolTip1->SetToolTip(button1, NULL);
Remove a ToolTip in the designer
In Visual Studio, select the control that is displaying the ToolTip.
In the Properties window, delete the text in the ToolTip on ToolTip1.
See also
.NET Desktop feedback