c# - How to close child and all step child windows -
I have an app that tracks the working time very basic I have a button on the Main Winfix which says the report when the Reports dialog is opened, there is a set of buttons that opens the other dialog boxes for the action.
I am trying to quit the report dialog and close all the hair windows at the same time. If the report dialog stops, all the hair windows in the report dialog should be closed, but time tracking should be turned on. I believe that these are modelless windows, I can communicate with all the dialogues without closing the parents' communication.
Private Zero StartForm_Click (Object Sender, EventArgs E) {F1 = New Start (Start); F1 Honor = this; F1.Show (); } So basically I have:
Mainform & gt; Balform & gt; Many Steps Kids (??) I have tried to stop the child and step children in this way.
Private Zero Close_Click (Object Sender, FormClosingEventArgs e) {this.Dispose (); // it did not work. EXT (); // The whole application has crashed}} Can anyone point me in the right direction?
@ γΠ· Ï ?? Î¬Ï ?? κÏÏÏÏÏÏÏ ÎÎ ÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÏÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎÎ ÎÎÎÎÎÏ? Î ¼ μμ
Great response thanks. I would definitely like to read more about it. Honor I can see it becoming very powerful to use it.
per @ γΠ· Ï ?? ¬ Ï ?? ÎºÏ ?? Î''Î ± ÎμÎ¯Ï ?? οΠ»Î» άÎ'ιÎ'Î ± Ï Î Î Î Î Î ?? Î ¼ μμ The answer was to report ownership of the GrandBillland dialog box
private zeros bSubmitTime_Click (Object Sender, EventArgs e) {// TrackChildForm (); SubmitTime sf1 = New SubmitTime (); Sf1.Owner = This; Sf1.Show (); } Then when the bus runs out. Close () I chose. As defined () I have been told that this system will make a bit more clean trying to clean the code: - D
Private Zero Close_Click (Object Sender, FormClosingEventArgs E) {form1p = (Form 1) this.Owner; Control [] c = p.Controls.Find ("bStartForm", true); Button B = (button) C [0]; B Competent = true; This.Dispose (); } Thanks for everyone for answering. I really appreciate it. have a great day!! : -)
Comments
Post a Comment