G
Guest
Hello, everyone:
I have a dialog form need to initial some data from its ParentForm, but I can not get its ParentForm. what I have done is:
when I click one button1 on Form1, it does:
{
dialog d=new dialog();
d.ShowDialog();
}
in the Dialog form, after initialize the components, even I check its ParentForm
if(this.ParentForm==null)
{
MessageBox.Show("no parent form");
}
I always get "no parent form".
Could anyone tell me what's wrong I have done?
Sincerely,
Haiwen
I have a dialog form need to initial some data from its ParentForm, but I can not get its ParentForm. what I have done is:
when I click one button1 on Form1, it does:
{
dialog d=new dialog();
d.ShowDialog();
}
in the Dialog form, after initialize the components, even I check its ParentForm
if(this.ParentForm==null)
{
MessageBox.Show("no parent form");
}
I always get "no parent form".
Could anyone tell me what's wrong I have done?
Sincerely,
Haiwen