Click here to Skip to main content
15,907,497 members
Home / Discussions / C#
   

C#

 
GeneralRe: Control Box Close Button Event Pin
VenkataRamana.Gali22-Jul-07 23:15
VenkataRamana.Gali22-Jul-07 23:15 
GeneralRe: Control Box Close Button Event Pin
Martin#22-Jul-07 23:24
Martin#22-Jul-07 23:24 
GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 2:17
sitebuilderLuc Pattyn23-Jul-07 2:17 
GeneralRe: Control Box Close Button Event Pin
Martin#23-Jul-07 2:41
Martin#23-Jul-07 2:41 
GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 3:07
sitebuilderLuc Pattyn23-Jul-07 3:07 
GeneralRe: Control Box Close Button Event Pin
Martin#23-Jul-07 3:09
Martin#23-Jul-07 3:09 
GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 3:30
sitebuilderLuc Pattyn23-Jul-07 3:30 
GeneralRe: Control Box Close Button Event Pin
Martin#23-Jul-07 3:43
Martin#23-Jul-07 3:43 
Luc Pattyn wrote:
we have different systems

XP; VS2003; .Net1.1

Luc Pattyn wrote:
there is a misunderstanding somewhere

If I test following code at my Form, it does what I wrote in the comments of the code:
private void CancelButton_Click(object sender, System.EventArgs e)
{
    this.DialogResult = DialogResult.Cancel;
    this.Close();
}

protected override void OnClosing(CancelEventArgs e)
{
    if(this.DialogResult == DialogResult.None)
    {
        //'X' was pressed
    }
    else if(this.DialogResult == DialogResult.Cancel)
    {
        //CancelButton was Pressed
    }

    base.OnClosing (e);
}


Luc Pattyn wrote:
one of us is wrong (but who then?)

It's maybe a lack of self confidence, but I would assume it's me who missed something!

Luc Pattyn wrote:
The last post from the OP seems to hint towards the third possibility, doesnt it ?

I haven't understood this one!

Smile | :)

All the best,

Martin

GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 4:02
sitebuilderLuc Pattyn23-Jul-07 4:02 
GeneralRe: Control Box Close Button Event Pin
Martin#23-Jul-07 4:13
Martin#23-Jul-07 4:13 
GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 4:13
sitebuilderLuc Pattyn23-Jul-07 4:13 
GeneralRe: Control Box Close Button Event Pin
Martin#23-Jul-07 4:20
Martin#23-Jul-07 4:20 
GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 4:41
sitebuilderLuc Pattyn23-Jul-07 4:41 
GeneralRe: Control Box Close Button Event Pin
Martin#23-Jul-07 4:45
Martin#23-Jul-07 4:45 
GeneralRe: Control Box Close Button Event Pin
Luc Pattyn23-Jul-07 4:59
sitebuilderLuc Pattyn23-Jul-07 4:59 
QuestionFile Download Pin
AB777122-Jul-07 20:33
AB777122-Jul-07 20:33 
AnswerRe: File Download Pin
Christian Graus22-Jul-07 20:54
protectorChristian Graus22-Jul-07 20:54 
GeneralRe: File Download Pin
AB777122-Jul-07 20:59
AB777122-Jul-07 20:59 
Questionglossary Pin
vimala soujanya22-Jul-07 20:29
vimala soujanya22-Jul-07 20:29 
AnswerRe: glossary Pin
Christian Graus22-Jul-07 20:52
protectorChristian Graus22-Jul-07 20:52 
Questiondropdown list problem Pin
srinivassam22-Jul-07 20:26
srinivassam22-Jul-07 20:26 
AnswerRe: dropdown list problem Pin
Christian Graus22-Jul-07 20:37
protectorChristian Graus22-Jul-07 20:37 
QuestionHow to disable right click menu/ context menu of datagrid Pin
Software_Guy_12322-Jul-07 20:03
Software_Guy_12322-Jul-07 20:03 
AnswerRe: How to disable right click menu/ context menu of datagrid Pin
Martin#22-Jul-07 20:16
Martin#22-Jul-07 20:16 
GeneralRe: How to disable right click menu/ context menu of datagrid Pin
Software_Guy_12322-Jul-07 20:45
Software_Guy_12322-Jul-07 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.