|
-
Mar 4th, 2003, 05:48 AM
#1
Thread Starter
Hyperactive Member
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?
-
Mar 4th, 2003, 07:04 AM
#2
Frenzied Member
-
Mar 4th, 2003, 07:12 AM
#3
Thread Starter
Hyperactive Member
Thanks.
I wonder why they felt unloadmode should be removed...
-
Mar 4th, 2003, 12:16 PM
#4
Thread Starter
Hyperactive Member
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) -
-
Mar 5th, 2003, 05:40 PM
#5
Junior Member
Sorry was thinking of vb6
-
Mar 5th, 2003, 06:05 PM
#6
Frenzied Member
And that works in VB.NET???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|