Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
ToolTip Component
 Setting ToolTips for Controls on a ...
Visual Studio
Setting ToolTips for Controls on a Windows Form

You can set a ToolTip string in code or in the designer.

To set a tool tip programmatically

  1. Add the control that will display the ToolTip.
  2. 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

  1. Add a ToolTip component to the form.
  2. Select the control that will display the ToolTip, or add it to the form.
  3. In the Properties window, set the ToolTip on ToolTip1 value to an appropriate string of text.

See Also

Introduction to the Windows Forms ToolTip Component | Changing the Delay of the Windows Forms ToolTip Component | ToolTip Component (Windows Forms)

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker