[Solved] RadMessageBox throwing exception

1 Answer 7 Views
MessageBox
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Toby asked on 19 Jun 2026, 12:57 PM

I've recently had several instances where callingRadMessageBox throws an exception deep inside the Telerik WinForms framework.

This was using version 2026.1.415.48, I have just today updated to 2026.2.520.48.

In both cases the calling code is similar to this

RadMessageBox.SetThemeName ( ScenarioGlobal.G_Theme.ThemeName );
RadMessageBox.Instance.TopMost = true;
RadMessageBox.Show ( null, successText, ScenarioGlobal.G_Form_Title, MessageBoxButtons.OK, Resources.Info_48x48 );

The resulting stack trace in both cases, is as follows

System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.

   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)

   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)

   at Telerik.WinControls.UIAutomation.RadControlBaseRootUIAutomationProvider`1.get_BoundingRectangle() in C:\a\1\s\RadControls\RadControlsUI\Accessibility\UIAutomation\RadControlBaseRootUIAutomationProvider.cs:line 50

   at Telerik.WinControls.UIAutomation.Window.RadFormUIAutomationProvider.Form_Resize(Object sender, EventArgs e) in C:\a\1\s\RadControls\RadControlsUI\Accessibility\UIAutomation\Window\RadFormUIAutomationProvider.cs:line 261

   at System.Windows.Forms.Control.OnResize(EventArgs e)

   at System.Windows.Forms.Form.OnResize(EventArgs e)

   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)

   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)

   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)

   at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)

   at System.Windows.Forms.Form.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)

   at Telerik.WinControls.UI.RadFormControlBase.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified) in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 1909

   at System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)

   at System.Windows.Forms.Control.set_Size(Size value)

   at System.Windows.Forms.Control.SetClientSizeCore(Int32 x, Int32 y)

   at System.Windows.Forms.Form.SetClientSizeCore(Int32 x, Int32 y)

   at Telerik.WinControls.UI.RadFormControlBase.SetClientSizeCore(Int32 x, Int32 y) in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 1861

   at Telerik.WinControls.UI.RadFormControlBase.OnThemeChanged() in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 1578

   at Telerik.WinControls.ComponentThemableElementTree.set_ThemeName(String value) in C:\a\1\s\RadControls\RadControl\TPF\Control\ComponentThemableElementTree.cs:line 144

   at Telerik.WinControls.UI.RadFormControlBase.set_ThemeName(String value) in C:\a\1\s\RadControls\RadControlsUI\RadForm\RadFormNew\RadFormControlBase.cs:line 2091

   at Telerik.WinControls.RadMessageBox.SetThemeName(String themeName) in C:\a\1\s\RadControls\RadControlsUI\UIElements\RadMessageBox\RadMessageBox.cs:line 37

Is this somethingmy application is doing / not doing or a "feature" of the RadMessageBox?

Cheers
Toby

 


1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 19 Jun 2026, 01:17 PM

Hi, Toby,

This is a known issue with RadForm and the newly introduced RadFormUIAutomationProvider in our latest 2025.2.520 version, which also affects RadMessageBox.

We are aware of this behavior and have it logged in our feedback portal here: RadForm: Exception thrown in RadFormUIAutomationProvider

We are doing our best to introduce a fix soon. Until we get ready, you can set the EnableUIAutomation property on RadMessageBox to prevent this error:

(RadMessageBox.Instance as RadForm).EnableUIAutomation = false;

    Please subscribe to the public item so that you can receive email notifications when the issue is fixed.

    Regards,
    Nadya | Tech Support Engineer
    Progress Telerik

    Modernizing a WinForms application? Use the AI-powered WinForms Converter to simplify migration to Telerik UI for WinForms.
    Tags
    MessageBox
    Asked by
    Toby
    Top achievements
    Rank 3
    Iron
    Iron
    Iron
    Answers by
    Nadya | Tech Support Engineer
    Telerik team
    Share this question
    or