To reproduce:
public Form1()
{
InitializeComponent();
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
}
Although the user is not allowed to resize the form from the form's borders, it is possible to do it by the context menu.
Workaround:
[DllImport("user32.dll")]
static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable);
internal const UInt32 MF_DISABLED = 0x00000002;
internal const UInt32 SC_SIZE = 0xF000;
internal const UInt32 WM_INITMENUPOPUP = 0x0117;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_INITMENUPOPUP && (((int)m.LParam & 0x10000) != 0))
{
EnableMenuItem(m.WParam, SC_SIZE, MF_DISABLED);
}
base.WndProc(ref m);
}