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
