# Getting Started with WinForms TrackBar

This tutorial will help you to quickly get started using the control.

## Adding Telerik Assemblies Using NuGet

To use `RadTrackBar` when working with NuGet packages, install the `Telerik.UI.for.WinForms.AllControls` package. The [package target framework version may vary](https://www.telerik.com/products/winforms/documentation/visual-studio-integration/available-nugets).

Read more about NuGet installation in the [Install using NuGet Packages](https://www.telerik.com/products/winforms/documentation/installation-and-upgrades/install-using-nuget) article.

> tip With the 2025 Q1 release, the Telerik UI for WinForms has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/winforms/documentation/licensing/license-key).

## Adding Assembly References Manually

When dragging and dropping a control from the Visual Studio (VS) Toolbox onto the Form Designer, VS automatically adds the necessary assemblies. However, if you're adding the control programmatically, you'll need to manually reference the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.WinControls**
* **Telerik.WinControls.UI**
* **TelerikCommon**

The Telerik UI for WinForms assemblies can be install by using one of the available [installation approaches](https://www.telerik.com/products/winforms/documentation/installation-and-upgrades/installing-on-your-computer).

## Defining the RadTrackBar

This tutorial demonstrates connecting a **RadTrackBar** to a **RadTextBox** control. Setting the track bar slider position changes the value in the text box.

1. Place a **RadTrackBar**, **RadTextBox** and **RadLabel** controls on a form.

2. Select the **RadLabel** control and set its **Text** property to "*Current Value:*".

3. Select the **RadTrackBar** control and set the **Maximum** property to **30**.

4. Click the **Events** toolbar button in the *Properties* window.

5. Double-click the **ValueChanged** event.

6. Replace the automatically-generated event handler with the following code:

```C#
void radTrackBar1_ValueChanged(object sender, EventArgs e)
{
    this.radTextBox1.Text = radTrackBar1.Value.ToString();
}
```

```VB.NET
Private Sub radTrackBar1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs)
    Me.radTextBox1.Text = radTrackBar1.Value.ToString()
End Sub
```

8\. Press **F5** to run the project.

9\. Move the slider on the track bar using the mouse. The text box will update to show the new slider position.

![WinForms RadTrackBar Getting Started](https://www.telerik.com/products/winforms/documentation/assets/9496c3851ffc2f8992d6353b3b2ae443/track-and-status-controls-trackbar-getting-started001.png)

## See Also

* [Structure](https://www.telerik.com/products/winforms/documentation/controls/track-and-status-controls/trackbar/control-element-structure)
* [Design Time](https://www.telerik.com/products/winforms/documentation/controls/track-and-status-controls/trackbar/design-time)

## Telerik UI for WinForms Learning Resources

* [Telerik UI for WinForms TrackBar Component](https://www.telerik.com/products/winforms/trackbar.aspx)
* [Getting Started with Telerik UI for WinForms Components](https://docs.telerik.com/devtools/winforms/getting-started/first-steps)
* [Telerik UI for WinForms Setup](https://docs.telerik.com/devtools/winforms/installation-and-upgrades/installing-on-your-computer)
* [Telerik UI for WinForms Converter](https://www.telerik.com/products/winforms/documentation/ai-coding-assistant/converter/converter)
* [Telerik UI for WinForms Visual Studio Templates](https://docs.telerik.com/devtools/winforms/visual-studio-integration/visual-studio-templates)
* [Deploy Telerik UI for WinForms Applications](https://docs.telerik.com/devtools/winforms/deployment-and-distribution/application-deployment)
* [Telerik UI for WinForms Virtual Classroom(Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/17/telerik-ui-for-winforms)
* [Telerik UI for WinForms License Agreement)](https://www.telerik.com/purchase/license-agreement/winforms-dlw-s)
