Error is received when click on button. Reproduced randomly on different machines.
Since 2025 Q2 you'll get this error message when you try to open a flyout on a control that is not a Form. This does not happen with 2025 Q1.
Might be related: https://feedback.telerik.com/winforms/1688619-radform-clientsize-on-inherited-radform-is-broken
However, this time I have no patch / workaround. I have not the time to investigage deeper at the moment, so update to Q2 not possible for me at the moment.
This issue starts happening as of Q2 (2025.2.520) version.
Workaround: override SetClientSizeCore() inside of inherited RadForm
public partial class RadForm2 : RadForm1
{
protected override void SetClientSizeCore(int x, int y)
{
base.SetClientSizeCore(x, y);
if ((!this.IsLoaded || !this.IsHandleCreated) &&
this.IsInitialized)
{
MethodInfo mi = typeof(Form).GetMethod("SetClientSizeCore", BindingFlags.NonPublic | BindingFlags.Instance);
if (mi != null)
{
IntPtr ptr = mi.MethodHandle.GetFunctionPointer();
Action<int, int> baseSetClientSizeCore = (Action<int, int>)Activator.CreateInstance(
typeof(Action<int, int>), this, ptr);
baseSetClientSizeCore.Invoke(x, y);
}
}
}
}
Add a call to "OnImageLoaded" to "RadPictureBoxelement.PasteImage()" method or create an event like "ImagePasted" ot be able to tract an image change at this point.
For me I solved this via an Harmony patch that adds a call to OnImageLoaded() on PasteImage() long time ago. Not really elegant, but I'm a noob in patching with Harmony.
Just want to leave it here for anyone that want ot use this solution too or for Telerik to implement a native way to expose an image change via PasteImage.
[HarmonyPatch(typeof(RadPictureBoxElement))]
[HarmonyPatch("PasteImage")]
public class RadPictureBoxElement_PasteImageFixes
{
private static readonly Dictionary<RadPictureBoxElement, Image> images = [];
public static void Prefix(object __instance)
{
if (__instance is RadPictureBoxElement pb)
{
// Remember our image
images.Remove(pb);
images.Add(pb, pb.Image);
}
}
public static void Postfix(object __instance)
{
if (__instance is RadPictureBoxElement pb && images.TryGetValue(pb, out var image) && pb.Image != image)
{
// Remove first to avoid conflicts on error
images.Remove(pb);
// Call "OnImageLoaded"
var method = typeof(RadPictureBoxElement).GetMethod("OnImageLoaded", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
method.Invoke(pb, null);
}
}
}
Steps to recreate:
When trying to open the QuickStart solution from
C:\Program Files (x86)\Progress\Telerik UI for WinForms 2025 Q1\Examples
installation folder, the following error appears:
Visual Studio 2022 crashes when working with a solution containing two WinForms projects:
Steps to Reproduce:
Expected Result:
Visual Studio should smoothly switch between code and designer views without issues.
Actual Result:
Visual Studio freezes and crashes after switching back to the WinForms designer in Project 2.
Environment:
Additional Notes:
When the RadPropertyGrid is in group scenario and we expand more property items, the scroll value is incorrect.
Workaround: set UseCompatibleTextRendering to true.