Hello WinForm App experts,
Could you tell me if this is possible:
1. Form1 Button1_Click -> Form2 Show(), Form1 Button1 disable
// The first event above is clearly no prolem!
2. Form2 closed -> Form1 Button1 enable
// I can't make this till now
Why I want to do this? Because I must use Show() method instead of ShowDialog(), so that the form1 and form2 can be operated parallelly. But the problem is that, I want the button1 in form1 only to be enabled while form2 is closed.
Is controlling a control in anoter form possible? I saw articles for c#, but when I "translate" them in C++/CLI, it doesn't seem to work.
So I used varible to enable the button1. Also when Form2 Closing, do a=1;
I want get the a=1 in an event for form1, but I can't find a suitable one.
When my idea is impossible. Could you give me your advices?
Thank you in advance!
Hi mates,
now it works well with Marcus' c# code. But I also want to write it into C++/CLI, and I don't quite understand what "(o, arg)=>" is. Is it the so-called "lambda expression"? How should it be written in C++/CLI?
I know at least that the "var form2Obj = new Form2();" should like this in C++/CLI:
auto form2Obj = gcnew Form2();
Thank you for helping!