Dealy

Dealy

  • NA
  • 213
  • 0

Parent/Child form issue

Mar 19 2010 3:10 AM
Hello,

i have the following code:
   private void searchDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
string passIDNO;
passIDNO = searchDataGridView.Rows[e.RowIndex].Cells[1].Value.ToString();
Form1 form1 = new Form1(passIDNO, 1);
form1.button1_Click(sender, e); // Retrieves data of Customer to Form1
//form1.MDIParent = ????
form1.Show();
}

I have a ParentForm called MainForm and all my forms open inside MainForm. How can i make Form1 (which is called from Form2) opens inside MainForm as well?
(Form2 opens inside MainForm)

Thank you in advance.


Answers (2)