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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
EhteshamRank #3,979 · 374 reputationPosted May 25, 2012, 1:37 AM EDT
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
Memento104 reputationPosted May 25, 2012, 6:01 AM EDT
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 ?