Since it ParentFormwill return Form, not your form, you need to execute it before you can access any of your custom properties:
((MyForm)this.ParentForm).textbox = "new text!";
In addition, you install the entire control, not just text.
Try this to expose only a text property:
public string txtbox
{
get
{
return mybox.Text;
}
set
{
mybox.Text = value;
}
}
Odded source
share