private void ShowNewForm(object sender, EventArgs e) { frmChild childForm = new frmChild(); childForm.MdiParent = this; childForm.Text = "Окно " + childFormNumber++; childForm.Show(); }
private void OpenFile(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); openFileDialog.Filter = "bmp (*.bmp)|*.bmp|jpeg (*.jpeg)|*.jpeg|png (*.png)|*.png"; if (openFileDialog.ShowDialog(this) == DialogResult.OK) { GetPictureBox.LiveImage = new Bitmap(Path.GetFullPath(openFileDialog.FileName)); frmChild PaperForm = new frmChild(GetPictureBox.LiveImage) { MdiParent = this }; PaperForm.Show(); } }