S
Saimvp
Good day.
I have a question. I want to Pass the value of my textbox1 from FORM1 to my
Form2 into a textbox1.
#####FORM2 CODE######
private static frmNEmp sForm = null;
public static frmNEmp Instance()
{
if (sForm == null) { sForm = new frmNEmp(); }
return sForm;
}
#####FORM1 CODE#####
private void BUTTON1_Click(object sender, EventArgs e)
{
Form sForm = frmNEmp.Instance();
sForm.MdiParent = this;
sForm.Show();
sForm.Activate();
}
############END##########################
IN VB6 CODE: FORM2.TEXT1.TEXT = FORM1.TEXT1.TEXT
HOW ABOUT IN C#? BECAUSE I'VE TRY THE SOME EXAMPLE ON THE NET, LIKE THIS :
http://codeincsharp.blogspot.com/2008/04/how-to-pass-values-to-another-form.html
When I create another project and follow that codes, its run like what I want.
But when it comes to my project like the first codes above theres no passing
data happen. Please help me.
Thanks.
I have a question. I want to Pass the value of my textbox1 from FORM1 to my
Form2 into a textbox1.
#####FORM2 CODE######
private static frmNEmp sForm = null;
public static frmNEmp Instance()
{
if (sForm == null) { sForm = new frmNEmp(); }
return sForm;
}
#####FORM1 CODE#####
private void BUTTON1_Click(object sender, EventArgs e)
{
Form sForm = frmNEmp.Instance();
sForm.MdiParent = this;
sForm.Show();
sForm.Activate();
}
############END##########################
IN VB6 CODE: FORM2.TEXT1.TEXT = FORM1.TEXT1.TEXT
HOW ABOUT IN C#? BECAUSE I'VE TRY THE SOME EXAMPLE ON THE NET, LIKE THIS :
http://codeincsharp.blogspot.com/2008/04/how-to-pass-values-to-another-form.html
When I create another project and follow that codes, its run like what I want.
But when it comes to my project like the first codes above theres no passing
data happen. Please help me.
Thanks.