Home All Groups Group Topic Archive Search About

difference between MyBase.Closing and MyBase.FormClosing

Author
6 Nov 2006 1:19 PM
Academic
I read the Help and some of the many Google hits I got but can't find out
the difference between MyBase.Closing and MyBase.FormClosing


Can anyone tell me?




Thanks

Author
6 Nov 2006 2:17 PM
Chris Dunaway
Academic wrote:
> I read the Help and some of the many Google hits I got but can't find out
> the difference between MyBase.Closing and MyBase.FormClosing
>
>
> Can anyone tell me?
>

The Closing event is deprecated in .Net 2.0 and is provided for
backwards compatibility.  You should use FormClosing from now on.

>From the docs:

"The Closing event is obsolete in the .NET Framework version 2.0; use
the FormClosing event instead."


Chris
Author
6 Nov 2006 6:02 PM
Academic
I was wondering if anyone knows what is different


Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1162822679.149993.15190@f16g2000cwb.googlegroups.com...
> Academic wrote:
>> I read the Help and some of the many Google hits I got but can't find out
>> the difference between MyBase.Closing and MyBase.FormClosing
>>
>>
>> Can anyone tell me?
>>
>
> The Closing event is deprecated in .Net 2.0 and is provided for
> backwards compatibility.  You should use FormClosing from now on.
>
>>From the docs:
>
> "The Closing event is obsolete in the .NET Framework version 2.0; use
> the FormClosing event instead."
>
>
> Chris
>
Author
6 Nov 2006 11:10 PM
Jay B. Harlow
Academic,
In addition to the other comments.

FormClosing as an expanded EventArgs that include information about why the
form is closing.
http://msdn2.microsoft.com/en-us/library/system.windows.forms.formclosingeventargs(VS.80).aspx

Where as Closing simply has a CancelEventArgs
http://msdn2.microsoft.com/en-us/library/system.componentmodel.canceleventargs(VS.80).aspx

--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


Show quoteHide quote
" Academic" <academicNOSPAM@a-znet.com> wrote in message
news:e1%23PrYaAHHA.3536@TK2MSFTNGP03.phx.gbl...
>I read the Help and some of the many Google hits I got but can't find out
>the difference between MyBase.Closing and MyBase.FormClosing
>
>
> Can anyone tell me?
>
>
>
>
> Thanks
>
Author
7 Nov 2006 1:22 AM
Academic
Thanks, I read the Help but didn't dig enough to find the CloseReason
Enumeration

Jay, I wish you'd look at my other post. I find that if I have a MDI form
open, and also a non-MDI non-MDI-Child Form open and close the app (by
clicking the X button) the non-MDI non-MDI-Child Form does not get a
FormClosing event.


Thanks again

PS By "non-MDI non-MDI-Child Form " I mean a regular run-of-the-mill form



Show quoteHide quote
"Jay B. Harlow" <Jay_Harlow_***@tsbradley.net> wrote in message
news:7CF55DCD-C4DB-4CE1-96E8-B7B0A9540322@microsoft.com...
> Academic,
> In addition to the other comments.
>
> FormClosing as an expanded EventArgs that include information about why
> the form is closing.
> http://msdn2.microsoft.com/en-us/library/system.windows.forms.formclosingeventargs(VS.80).aspx
>
> Where as Closing simply has a CancelEventArgs
> http://msdn2.microsoft.com/en-us/library/system.componentmodel.canceleventargs(VS.80).aspx
>
> --
> Hope this helps
> Jay B. Harlow
> .NET Application Architect, Enthusiast, & Evangelist
> T.S. Bradley - http://www.tsbradley.net
>
>
> " Academic" <academicNOSPAM@a-znet.com> wrote in message
> news:e1%23PrYaAHHA.3536@TK2MSFTNGP03.phx.gbl...
>>I read the Help and some of the many Google hits I got but can't find out
>>the difference between MyBase.Closing and MyBase.FormClosing
>>
>>
>> Can anyone tell me?
>>
>>
>>
>>
>> Thanks
>>
>