Smaller Border on Sizeable Windows Form

746 Views Asked by At

I want the Border-Thickness around the Form smaller.

I make FormBorderStyle = Sizeable, because I want that Aero Snap works.

Then I found a hint that I need WM_NCCALCSIZE for this.

protected override void WndProc(ref Message m)
{
    switch (m.Msg)
    {
        case WM_NCCALCSIZE:
            break;
        default:
            base.WndProc(ref m);
            break;
    }
}

But then I don't have any border.

1

There are 1 best solutions below

1
Matin Lotfaliee On

I think you can simply do that by setting these:

ControlBox = false;
MinimizeBox = false;
MaximizeBox = false; 
Text = "";

This will be the result:

enter image description here