New to Telerik UI for WinFormsStart a free 30-day trial

Getting Started with WinForms MessageBox

Updated over 6 months ago

This article shows how you can start using RadMessageBox.

Adding Telerik Assemblies Using NuGet

To use RadMessageBox when working with NuGet packages, install the Telerik.UI.for.WinForms.AllControls package. The package target framework version may vary.

Read more about NuGet installation in the Install using NuGet Packages article.

With the 2025 Q1 release, the Telerik UI for WinForms has a new licensing mechanism. You can learn more about it here.

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.

Defining the RadMessageBox

The following tutorial will show you a simple usage of RadMessageBox:

1. Create a new Windows Application in Visual Studio

2. Drag and drop a RadButton on the form.

3. Subscribe to the Click event of this RadButton.

4. Make sure that you import/use the following namespaces

C#
using Telerik.WinControls;

5. In the RadButton.Click event handler, first set the theme of the RadMessageBox and then call its static Show method of the RadMessageBox class, passing the appropriate parameters. Set the RadMessageBox.Show method to a DialogResult variable:

Setting a theme and showing RadMessageBox

C#
private void radButton1_Click(object sender, EventArgs e)
{
    RadMessageBox.SetThemeName("Desert");
    
    DialogResult ds = RadMessageBox.Show(this, "Are you sure?", "Title", MessageBoxButtons.YesNo, RadMessageIcon.Question);
    this.Text = ds.ToString();
}

6. The result RadMessageBox is shown below:

WinForms RadMessageBox Getting Started

See Also

Telerik UI for WinForms Learning Resources