A
athlonman
Hi all!!
II'm trying to set the Text of a TextBox in "Form1" when I click a
Button in a UserControl. My code is:
[Form1.cs]:
public class Form1 : System.Windows.Forms.Form
{
public System.Windows.Forms.TextBox textBox1;
private WindowsApplication1.UserControl1 userControl11;
{...}
}
provate void InitializeComponent()
{
{...}
this.userControl11 = new WindowsApplication1.UserControl1(this);
{...}
}
[UserControl1.cs]:
public class UserControl1 : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components = null;
public UserControl1(Form1 frm)
{
InitializaComponent();
}
{...}
private void button1_Click(object sender, System.EventArgs e)
{
//Here is where I wish to set the Text of the TextBox of Form1!!!!
}
}
Is it possible?? i've been searching for help on this but i can't find
it. Hope anybody could help. BTW I'm a newbie
Thanks in advance.
II'm trying to set the Text of a TextBox in "Form1" when I click a
Button in a UserControl. My code is:
[Form1.cs]:
public class Form1 : System.Windows.Forms.Form
{
public System.Windows.Forms.TextBox textBox1;
private WindowsApplication1.UserControl1 userControl11;
{...}
}
provate void InitializeComponent()
{
{...}
this.userControl11 = new WindowsApplication1.UserControl1(this);
{...}
}
[UserControl1.cs]:
public class UserControl1 : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Button button1;
private System.ComponentModel.Container components = null;
public UserControl1(Form1 frm)
{
InitializaComponent();
}
{...}
private void button1_Click(object sender, System.EventArgs e)
{
//Here is where I wish to set the Text of the TextBox of Form1!!!!
}
}
Is it possible?? i've been searching for help on this but i can't find
it. Hope anybody could help. BTW I'm a newbie

Thanks in advance.