This documentation is archived and is not being maintained.
Setting ToolTips for Controls on a Windows Form
Visual Studio .NET 2003
You can set a ToolTip string in code or in the designer.
To set a tool tip programmatically
- Add the control that will display the ToolTip.
- Use the SetToolTip method of the ToolTip component.
'Visual Basic ' In this example, Button1 is the control to display the ToolTip. ToolTip1.SetToolTip(Button1, "Save changes") // C# // In this example, button1 is the control to display the ToolTip. toolTip1.SetToolTip(button1, "Save changes"); // C++ // In this example, button1 is the control to display the ToolTip. toolTip1->SetToolTip(button1, S"Save changes");
To set a tool tip in the designer
- 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.