I\'m working on a C# program, and right now I have one Form and a couple of classes. I would like to be able to access some of the Form controls (s
I'm relatively new to c# and brand new to stackoverflow. Anyway, regarding the question on how to access controls on a form from a class: I just used the ControlCollection (Controls) class of the form.
//Add a new form called frmEditData to project.
//Draw a textbox on it named txtTest; set the text to
//something in design as a test.
Form frmED = new frmEditData();
MessageBox.Show(frmED.Controls["txtTest"].Text);
Worked for me, maybe it will be of assistance in both questions.