G
Guest
Hi
I'm having trouble setting the main form visible from within the child form. I have set the main form to hide (SignatureMain.Hide())
I then load the child form from within a button on form1
Treatment.ShowDialog()
On the child form Treatment i try to do the following in an Exit button
this.ParentForm.Visible = true
this.Close()
What i'm gettign is the following
An unhandled exception of type 'System.NullReferenceException' occurred in Signature.ex
Additional information: Object reference not set to an instance of an object
NOTE
I have even set the parent form as follows
Treatment.ShowDialog(this)
This is suppose to set the this (SignatureMain) as the parent to Treatment
When i run the debbugger and look at ParentForm, its null??
Thanks
I'm having trouble setting the main form visible from within the child form. I have set the main form to hide (SignatureMain.Hide())
I then load the child form from within a button on form1
Treatment.ShowDialog()
On the child form Treatment i try to do the following in an Exit button
this.ParentForm.Visible = true
this.Close()
What i'm gettign is the following
An unhandled exception of type 'System.NullReferenceException' occurred in Signature.ex
Additional information: Object reference not set to an instance of an object
NOTE
I have even set the parent form as follows
Treatment.ShowDialog(this)
This is suppose to set the this (SignatureMain) as the parent to Treatment
When i run the debbugger and look at ParentForm, its null??
Thanks