-
UnloadMode
This question has been asked before, but I haven't yet found an answer.
I wish to test to see if the form I have is closing because the "X" button has been clicked.
I know I need to put code in the fomr_Closing event,
and I know I can cancel the close using "e.Cancel = True"
However, I only wish to do this if the form is closing due to the"X" and not the numerous other reasons a form could be closing.
Any ideas?
-
-
Thanks.
I wonder why they felt unloadmode should be removed...
-
ok, I tried that code and every time I test the return string is "RunDialog" whether I cause the close in code (me.close) or press the "x"...
The form being displayed is being shown modally (ShowDialog) -
-
Sorry was thinking of vb6
-
And that works in VB.NET???