winforms

form/control not maximised

A horrible hack to make a Form correctly resize on first load when it’s parent(s) are not passing down correctly a WindowState;

private void Form_Load(object sender, System.EventArgs e)
{
    WindowState = FormWindowState.Maximized; // yech
    WindowState = FormWindowState.Normal;    // but it works
}

controls resizing at runtime

Form.AutoScaleBaseSize