i have the following code:
|
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.
|
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hirendra SisodiyaPosted Mar 19, 2010, 3:50 AM
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 = this.MdiParent;
form1.Show();
}
thanks
Please mark as answere if you like my answere
DealyPosted Mar 19, 2010, 4:51 AM