public int Max(FormManageCar frm) { int maxi = 0; foreach (Control c in frm.Controls) { if (maxi < c.Width) { maxi = c.Width; } } return(maxi); }
public formMain() { InitializeComponent(); frmManageCar = new FormManageCar(); frmManageCar.MdiParent = this; frmManageCar.Dock = DockStyle.Fill; frmDeals = new FormDeals(); frmDeals.MdiParent = this; frmDeals.Dock = DockStyle.Fill; frmReservation = new FormReservations(); frmReservation.MdiParent = this; frmReservation.Dock = DockStyle.Fill; frmCustomerProfile = new FormCustomerProfile(); frmCustomerProfile.MdiParent = this; frmCustomerProfile.Dock = DockStyle.Fill; frmCustomerReservation = new FormCustomerReservation(); frmCustomerReservation.MdiParent = this; frmCustomerReservation.Dock = DockStyle.Fill; }