private void pictureBox1_Click(object sender, EventArgs e) { UCAddVehicle addVehicle = new UCAddVehicle(); panel4.Controls.Add(addVehicle); addVehicle.BringToFront(); addVehicle.Dock = DockStyle.Fill; }
private void vehicleToolStripMenuItem_Click(object sender, EventArgs e) { UCVehicle Vehicle = new UCVehicle(); this.panel3.Controls.Add(Vehicle); Vehicle.BringToFront(); Vehicle.Dock = DockStyle.Fill; UCAddVehicle AddVehicle = new UCAddVehicle(); Vehicle.panel4.Controls.Add(AddVehicle); AddVehicle.BringToFront(); AddVehicle.Dock = DockStyle.Fill; }