hi all,
I have a main from with all the details if any of the detail is not available I have kept a button close to the field so the user clicks on it and another forms pop in. So what i want is if the user adds a new entry or updates an entry the textbox in the main form should be updated. Simple as that.
I doesn't work for me without any reason.
In my main form i keep a GLobal reference to my main form as :
static void Main()
{
parentForm=new frmCDs(); //public
Application.Run(new frmCDs());
}
then in my pop up form i do as follow:
//txtCategory is public
frmCDs.parentForm.txtCategory.Text=MyNewValue;
even I tryed something like:
//In my pop up form
frmCDs.parentForm.ChangeText();
//in main form
public void ChangeText()
{
this.txtCategory.Text="changed";
}
But it doesn't work. any suggestion?
regards
I have a main from with all the details if any of the detail is not available I have kept a button close to the field so the user clicks on it and another forms pop in. So what i want is if the user adds a new entry or updates an entry the textbox in the main form should be updated. Simple as that.
I doesn't work for me without any reason.
In my main form i keep a GLobal reference to my main form as :
static void Main()
{
parentForm=new frmCDs(); //public
Application.Run(new frmCDs());
}
then in my pop up form i do as follow:
//txtCategory is public
frmCDs.parentForm.txtCategory.Text=MyNewValue;
even I tryed something like:
//In my pop up form
frmCDs.parentForm.ChangeText();
//in main form
public void ChangeText()
{
this.txtCategory.Text="changed";
}
But it doesn't work. any suggestion?
regards