C
C# Dev
Hi Group,
I raise OnClosing event in a handler of a menu item. It invokes the
OnClosing registered delegate but it doesnot close the form.
But if i click on the close icon [X] of the form it invokes the OnClosing
registered delegate and then closes the form. Can anyone
help why same event handler (OnClosing) have different behaviour when
invoked from code or clicked on from close button [X].
// Following is the menu event handler raising OnClosing event.
private void miExit_Click(object sender, System.EventArgs e)
{base.OnClosing(new CancelEventArgs(false)); }
Thanks.
I raise OnClosing event in a handler of a menu item. It invokes the
OnClosing registered delegate but it doesnot close the form.
But if i click on the close icon [X] of the form it invokes the OnClosing
registered delegate and then closes the form. Can anyone
help why same event handler (OnClosing) have different behaviour when
invoked from code or clicked on from close button [X].
// Following is the menu event handler raising OnClosing event.
private void miExit_Click(object sender, System.EventArgs e)
{base.OnClosing(new CancelEventArgs(false)); }
Thanks.