How to resize form in scale? C#
Someone asked on Stack Overflow:
i need that in my form the width is twice the height (1:2) also when i resize How i can do that? Thanks for help and sorry for my english :)
I posted the following answer, which was chosen as the accepted answer:
Checkout the Control.Resize event — also
private void Form1_Resize(object sender, System.EventArgs e)
{
Control control = (Control)sender;
control.Width = control.Height * 2;
}
Originally posted on Stack Overflow — 0 upvotes (accepted answer). Licensed under CC BY-SA.