This documentation is archived and is not being maintained.

ToolTip Changes in Visual Basic .NET

In Visual Basic 6.0, the ToolTipText property of a control was used to display a ToolTip at run time. If the property contained text, the ToolTip was displayed; if it was empty, no ToolTip was displayed.

In Visual Basic .NET, a single ToolTip control can be used to control the ToolTips for all controls on a form. The SetToolTip method is used to set the text for each ToolTip.

The following example demonstrates setting a ToolTip in Visual Basic 6.0 and Visual Basic .NET:

' Visual Basic 6.0
Button1.ToolTipText = "Saves changes"

' Visual Basic .NET
' Adds a ToolTip control (ToolTip1) to the form.
ToolTip1.SetToolTip(Button1, "Save changes")

See Also

Control Changes in Visual Basic .NET