EDITED: Apparently me not being very knowledgable in code in general at the time of making this question caused me to be banned for asking question so here I am trying to correct that. what I initially wanted back then was to reference a class, at the time I thought 2 different class files were regarded as private to another, now I know that upon compiling, all class files(or otherwise known as source files) are all binded together in the end and that what I actually needed to do was reference a class as in the variable, basically:
Form2 form2 = new Form2();
Visual Studio is rather hard to get your head around when you have no knowledge in code whatsoever and I'm sorry that I somehow was bad for the audience.
==========================================================================
I have a windows form (Form2
) which is basically a dialog box with comboboxes. I want the text values from 2 comboboxes to carry over to a textbox
in Form1
at the click of a button.
If I was doing this all from Form1 it would be:
Textbox1.Text += (value1) + (value2) + "\n";
but since the textbox in Form1 is private, Form2 doesn't recognize it.
My question is this: how do I get Form2 to acknowledge the existence of the textbox in Form1?