pass a reference of the parent to the dialog window's constructor and
expose as public properties in the parent what ever u need to access
from the child
I guess Bijoy is suggesting this way
/////
class MyForm : Form
{
ParentForm _parent;
public MyForm (ParentForm parent)
{
_parent = parent;
}
}
/////
And as Bijoy said, if you want to access the controls in the parent form,
you need change their Modifiers to public (by default is private) Or define
a Public property to expose them.
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
If the Dialogbox just needs some information from the parent form for one
time,
it's a simple solution to define some public field to get these information.
You may also try defining a method to set these information into the dialog
box object to
de-couple the parent form code and the public variable.
If you have any further questions on this issue, please feel free to reply
this thread.
This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.