access public controls on form2 from form1
-
Hi, on my app, i've 2 forms (form1 and form2). On form2 i've dropped a combobox (named cb1) and declared it has public( public System.Windows.Forms.ComboBox cb1;). Now, i want to access it from form1 (whit a statment like this one: Form f2 = new form2(); f2.cb1.size.With = 30;) , but i do not have access to it...???? What do i need to do to see my form2 combobox from form1, i thought that it would bee enough to declare it public, but looks like i'm wrong... Thanks Carlos Lopes
-
Hi, on my app, i've 2 forms (form1 and form2). On form2 i've dropped a combobox (named cb1) and declared it has public( public System.Windows.Forms.ComboBox cb1;). Now, i want to access it from form1 (whit a statment like this one: Form f2 = new form2(); f2.cb1.size.With = 30;) , but i do not have access to it...???? What do i need to do to see my form2 combobox from form1, i thought that it would bee enough to declare it public, but looks like i'm wrong... Thanks Carlos Lopes