Home > OS >  C # winform child form
C # winform child form

Time:11-28

There is a button in the Form1, click on the button can generate multiple Form2
Form1 text shows the current number of real-time window, click the Form2 in the top right corner of the button to close the child form, at the same time the text data in Form1 decrescent, should how to do?
Winform novice, has calculated the real-time number of child Windows, but I did not change the total when I turn off the child window, to solve!

CodePudding user response:

Queue with a linked list storage, data to Form a pointer type, generated by the window is stored in the text according to the list or queue can know

CodePudding user response:

Using arrays can also

CodePudding user response:

Close the window, need destructor window object

CodePudding user response:

I use the foreach total traverse the statistics window, I in Form2 FormClosing function in the form of statistical number off the window, and then the digital in Form1, but no response

CodePudding user response:

Update the main form in winform close events on the number of child form can,,, open a function for processing,,,
  • Related