I am developing WinForms MDI app in VS2010 (.NET 4.0) and I just hate 3D border in MDI parent form.
So any ideas on how to remove it (make it flat or just no border it all) ?
If you would prefer not to import external libraries there is also following cheat which repositions/resizes the mdi container control.
    protected override void OnLoad(EventArgs e)
    {
        var mdiclient = this.Controls.OfType<MdiClient>().Single();
        this.SuspendLayout();
        mdiclient.SuspendLayout();
        var hdiff = mdiclient.Size.Width - mdiclient.ClientSize.Width;
        var vdiff = mdiclient.Size.Height - mdiclient.ClientSize.Height;
        var size = new Size(mdiclient.Width + hdiff, mdiclient.Height + vdiff);
        var location = new Point(mdiclient.Left - (hdiff / 2), mdiclient.Top - (vdiff / 2));
        mdiclient.Dock = DockStyle.None;
        mdiclient.Size = size;
        mdiclient.Location = location;
        mdiclient.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
        mdiclient.ResumeLayout(true);
        this.ResumeLayout(true);
        base.OnLoad(e);
    }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With