Events
-
Hello, I have a main form that contains many form. When i am trying to close the main form by the X control box button, the onformclosing event of the child forms are launched before the main form event (onclosing) are launched. How can i capte the X button closing in the mainform first? best regards,
dghdfghdfghdfghdgh
-
Hello, I have a main form that contains many form. When i am trying to close the main form by the X control box button, the onformclosing event of the child forms are launched before the main form event (onclosing) are launched. How can i capte the X button closing in the mainform first? best regards,
dghdfghdfghdfghdgh
The main form is closing it's children first. This is logical. I am not sure if you can do anything about it.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hello, I have a main form that contains many form. When i am trying to close the main form by the X control box button, the onformclosing event of the child forms are launched before the main form event (onclosing) are launched. How can i capte the X button closing in the mainform first? best regards,
dghdfghdfghdfghdgh
You can check the FormClosingEventArgs in FormClosing. Allows you to cancel closing the form. I don't really know if the child forms will stay open, but it sounds logical that they will.