property ScrollBar.ToolTipText as String
Specifies the control's tooltip text.

TypeDescription
String A String expression that specifies the tooltip being displayed when the user clicks and moves the control's thumb. 
Use the ToolTipText property to assign a tooltip to be displayed when the user clicks and moves the thumb part of the control. Use the ToolTipTitle property to assign a title for the tooltip. The tooltip shows up only when the user clicks and moves the thumb, and the ToolTipText or ToolTipTitle property is not empty. Use the Value property to specify the control's value. Use the Minimum and Maximum properties to specify the range's value. The control fires the Change event property when the user changes the position of the thumb.

The following VB sample displays a tooltip when user moves the thumb:

Private Sub ScrollBar1_Change()
    With ScrollBar1
        .Object.ToolTipText = "Record " & .Value & "/" & .Maximum
        .ToolTipTitle = "Position"
    End With
End Sub

The following VB/NET sample displays a tooltip when user moves the thumb:

Private Sub AxScrollBar1_Change(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxScrollBar1.Change
    With AxScrollBar1
        .ToolTipText = "Record " & .Value.ToString() & "/" & .Maximum.ToString()
		.ToolTipTitle = "Position"
    End With
End Sub

The following C# sample displays a tooltip when user moves the thumb:

private void axScrollBar1_Change(object sender, EventArgs e)
{
    axScrollBar1.ToolTipText = "Record " + axScrollBar1.Value.ToString() + "/" + axScrollBar1.Maximum.ToString();
    axScrollBar1.ToolTipTitle = "Position";
}

The following C++ sample displays a tooltip when user moves the thumb:

void OnChangeScrollbar1() 
{
	CString strFormat;
	strFormat.Format( _T("Record %i/%i"), m_scrollbar.GetValue(), m_scrollbar.GetMaximum() );
	m_scrollbar.SetToolTipText( strFormat );
	m_scrollbar.SetToolTipTitle( "Position" );
}

The following VFP sample displays a tooltip when user moves the thumb:

*** ActiveX Control Event ***

with thisform.ScrollBar1
    .Object.ToolTipText = "Record " + ltrim(str(.Value)) + "/" + ltrim(str(.Maximum))
    .ToolTipTitle = "Position"
endwith