How to reproduce:
public partial class RadForm1 : RadForm
{
public RadForm1()
{
InitializeComponent();
this.AllowTheming = false;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
}
}
Workaround:
public partial class RadForm1 : RadForm
{
public RadForm1()
{
InitializeComponent();
this.AllowTheming = false;
this.FormBorderStyle = FormBorderStyle.FixedSingle;
}
protected override FormControlBehavior InitializeFormBehavior()
{
return new MyRadFormBehavior(this, true);
}
}
public class MyRadFormBehavior : RadFormBehavior
{
public MyRadFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
: base(treeHandler, shouldCreateChildren)
{ }
public override bool HandleWndProc(ref System.Windows.Forms.Message m)
{
BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.NonPublic;
if (m.Msg == NativeMethods.WM_NCHITTEST)
{
typeof(RadFormBehavior).GetMethod("OnWMNCHittest", bindingFlags).Invoke(this, new object[] { m });
return true;
}
if (!this.AllowTheming)
{
return false;
}
return base.HandleWndProc(ref m);
}
}