Q:

Setting Small Form Width Has Unexpected Results

I am working on an application which requires sometimes to display an small error message on the desktop. To some reason which I could not identify yet, I was not able to create a window with a width smaller than 136px (but works fine with any larger widths).
I am running VS Community2019, v16.4.5; using .NET Framework 4.8 (.Net Framework 4.6.2 had the same result). Here's a small code example which reproduces my problem:
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Diagnostics;

namespace TestWndSize
{
    public static class Program
    {
        public static Form MyForm1;
        public static int RqWidth = 120;

        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            MyForm1 = new Form();
            MyForm1.MouseEnter += MyForm1_MouseEnter;
            MyForm1.SizeChanged += MyForm1_SizeChanged;
            MyForm1.AutoSize = false;
            MyForm1.FormBorderStyle = FormBorderStyle.None;
            MyForm1.StartPosition = FormStartPosition.Manual;
            MyForm1.Location = new Point(1400, 100);
            Debug.WriteLine("---  Changing Width to " + RqWidth.ToString());
            MyForm1.Size = new Size(RqWidth, 100);
            Debug.WriteLine("---  Width should be now " + RqWidth.ToString()+"; is "+MyForm1.Width.ToString());
            MyForm1.BackColor = Color.LightBlue;

            Application.Run(MyForm1);
        }

        private static void MyForm1_SizeChanged(object sender, EventArgs e)
        {
            Debug.WriteLine("*** SizeChanged to Width=" + MyForm1.Width.ToString());
        }

        private static void MyForm1_MouseEnter(object sender, EventArgs e)
        {
            Debug.WriteLine("§§§  Current Width is " + MyForm1.Width.ToString());
        }
    }
}

The debug output is
*** SizeChanged to Width=300
---  Changing Width to 120
*** SizeChanged to Width=120
---  Width should be now 120; is 120
*** SizeChanged to Width=136        !!??!!
*** SizeChanged to Width=136        !!??!!
§§§  Current Width is 136       *Execution of MouseEnter*

The Width is changed to the requested value but then changed somehow (???) to 136px but only if the requested value is less than 136px.
As the debug output shows the SizeChanged event is executed two times for the undesired size but I do not see any reason why.
Does anybody have an idea what I am eventually missing?

A:

Probably during the form rendering initialization something changes the size back to a minimum required size. (It seems like the missing borders are not considered).
However you can simply change your size in the Form Load event handler and then the new values are respected
private static void MyForm1_Load(object sender, EventArgs e)
{
    Debug.WriteLine("*** FormLoad to Width=" + MyForm1.Width.ToString());
    MyForm1.Size = new Size(RqWidth, 100);
}

Of course you need to manually add the event handler

