I readed manu articles about this, but - still confused.
from Form1 I open Form2:
new Form2().Show();
On Form2.ClosingEvent I need:
Form1.TextBox1.Visible = false;
What code and exactly where should I put - to achieve this ?
I readed manu articles about this, but - still confused.
from Form1 I open Form2:
new Form2().Show();
On Form2.ClosingEvent I need:
Form1.TextBox1.Visible = false;
What code and exactly where should I put - to achieve this ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
EhteshamPosted May 25, 2012, 5:37 AM
Also you should not create form1 reference using new keyword, You can pass form1 reference to a parameterized constructor of form2 and then use the same
See similar post http://www.c-sharpcorner.com/Forums/Thread/172402/calling-button-object-from-another-winform.aspx
MementoPosted May 25, 2012, 10:01 AM
Finally, I succeed.
Ugh! - and - Thanks!
I remember, in some other langugages it's so simple:
Form1.TextBox1.Visible = False.
Why is c# so complicated, without any reason ?
And in the same time - so pupular ?