Hello Marc Gravell and Machin.
Good Day.
Why your not using an Instance in the form and yet your using a New Form?
Im using it because I want to open a single form only. If Im using a New
Form1, In my command button If I will click the button to show the Form1 it
will show the Form1 equal the click in the button.
What you suggestion to me. Im new in programming in C#.
Thanks.
--
To be Happy is To be Yourself
"Marc Gravell" wrote:
Good Day.
Why your not using an Instance in the form and yet your using a New Form?
Im using it because I want to open a single form only. If Im using a New
Form1, In my command button If I will click the button to show the Form1 it
will show the Form1 equal the click in the button.
What you suggestion to me. Im new in programming in C#.
Thanks.
--
To be Happy is To be Yourself
"Marc Gravell" wrote:
Simply create a property on Form2 that makes this possible:
>
public string CaptionText {
get {return textbox1.Text;}
set {textbox1.Text = value;}
}
>
and assign it:
>
sForm.CaptionTe xt = textbox1.Text;
sForm.Show();
>
For the record, I also don't recommend this Form2 Instance() approach;
I'd simply use a new frmNEmp();
>
A static form, in particular, has various issues with threading,
multiple parenting, etc...
>
Marc
>
>
public string CaptionText {
get {return textbox1.Text;}
set {textbox1.Text = value;}
}
>
and assign it:
>
sForm.CaptionTe xt = textbox1.Text;
sForm.Show();
>
For the record, I also don't recommend this Form2 Instance() approach;
I'd simply use a new frmNEmp();
>
A static form, in particular, has various issues with threading,
multiple parenting, etc...
>
Marc
>
Comment