|
-
May 5th, 2009, 08:35 AM
#1
[RESOLVED] How to recognize form [X] close?
I've just found this article on codeproject
http://www.codeproject.com/KB/dialog/CustomDialogs.aspx
and it's quite clear to me. However instead of using ShowDialog I'd like to use a simple Show because it should be a modeless form. I can set the DialogResult to OK or Cancel when I clicked a button and read it in a FormClosed event but how can I set it to Cancel when I clicked on the form's [X] symbol? I just can't figure it out I cannot change the DialogResult in FormClose or FormClosing event because it overwrites this what I've set on button's click.
Last edited by memeloo; May 5th, 2009 at 09:39 AM.
Reason: resolved
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
|