double oranW, oranH;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
oranW = (double)panel1.Size.Width / (double)this.Size.Width;
oranH = (double)panel1.Size.Height / (double)this.Size.Height;
}
public void yeniBoyut()
{
int sizeW = Convert.ToInt32(this.Size.Width * oranW);
int sizeH = Convert.ToInt32(this.Size.Height * oranH);
panel1.Size = new Size(sizeW, sizeH);
}
private void Form1_Resize(object sender, EventArgs e)
{
yeniBoyut();
}