transfer a value from one form to another

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

I have a form with a textbox that will hold a mean value. When the textbox
gets focus, another form pops up, values are entered, and the mean value is
calculated. The mean value is stored in a Public variable. The two forms
are in different classes. How do I transfer this value to the original
textbox?
 
The easiest way is to create a custom control that returns the calculated
value to the calling form.
 
FormMeanCal f = new FormMeanCal();
f.ShowDialog();
oriTextBox.text = f.sMeanValue;

public string sMeanValue; // FormMeanCal
where you put the calculated value

i hope this help
 
I will give it a try.
Thank you

MP said:
FormMeanCal f = new FormMeanCal();
f.ShowDialog();
oriTextBox.text = f.sMeanValue;

public string sMeanValue; // FormMeanCal
where you put the calculated value

i hope this help
 
Back
Top