コード例 #1
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns["edit_column"].Index)
     {
         string       intID  = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
         GenericNames myform = new GenericNames(intID);
         myform.MdiParent   = this.ParentForm;
         myform.WindowState = FormWindowState.Maximized;
         myform.Show();
         this.Close();
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: danushkas1215/MedicalClinic
        private void genericNamesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild != null)
            {
                ActiveMdiChild.Close();
            }
            GenericNames newMDIChild = new GenericNames(string.Empty);

            newMDIChild.MdiParent = this;
            newMDIChild.Show();
            newMDIChild.WindowState = FormWindowState.Maximized;
        }