I am using this code to change size of a panel
control for maximize
and normal state
, and it's working fine, but I am not getting how to re-size panel according to my background image when the user will re-size the form other than minimize,maximize and normal state, i.e using the mouse. how do I do this using some calculation code or any other way?
private void ParentHome_ClientSizeChanged(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Maximized)
{
this.Panel1.Size = new System.Drawing.Size(227, 324);
this.Panel1.Location = new System.Drawing.Point(69, 223);
}
else if (this.WindowState == FormWindowState.Normal)
{
this.Panel1.Size = new System.Drawing.Size(198, 289);
this.Panel1.Location = new System.Drawing.Point(60, 193);
}
}