Home All Groups Group Topic Archive Search About

Form1.closing in VB2005???

Author
13 Dec 2006 3:51 PM
cj
In VB2003I have been using an exit menu item that issues me.close() then
Private Sub Form1_Closing took care of closing everything down.  I don't
see a closing event for form1 in VB2005.  What takes it's place?

Author
13 Dec 2006 4:05 PM
TP
FormClosing

cj wrote:
Show quoteHide quote
> In VB2003I have been using an exit menu item that issues me.close()
> then Private Sub Form1_Closing took care of closing everything down.
> I don't see a closing event for form1 in VB2005.  What takes it's
> place?
Author
13 Dec 2006 4:07 PM
Izzy
Form1.FormClosing()

cj wrote:
Show quoteHide quote
> In VB2003I have been using an exit menu item that issues me.close() then
> Private Sub Form1_Closing took care of closing everything down.  I don't
> see a closing event for form1 in VB2005.  What takes it's place?
Author
13 Dec 2006 4:16 PM
cj
Thanks, TP and Izzy!  That was easy.

Izzy wrote:
Show quoteHide quote
> Form1.FormClosing()
>
> cj wrote:
>> In VB2003I have been using an exit menu item that issues me.close() then
>> Private Sub Form1_Closing took care of closing everything down.  I don't
>> see a closing event for form1 in VB2005.  What takes it's place?
>
Author
13 Dec 2006 4:17 PM
RobinS
It's called FormClosing now. (Irritating, isn't it?)

There's also an event called FormClosed that will trigger *after*
the form is closed.

Robin S.
--------------------------------------------------
Show quoteHide quote
"cj" <cj@nospam.nospam> wrote in message
news:evGoQ6sHHHA.3780@TK2MSFTNGP02.phx.gbl...
> In VB2003I have been using an exit menu item that issues me.close()
> then Private Sub Form1_Closing took care of closing everything down.
> I don't see a closing event for form1 in VB2005.  What takes it's
> place?
Author
13 Dec 2006 4:37 PM
cj
Irritating, yes.  I hope they had a good reason for it but ...

Yea, I knew "closed" existed but haven't had a use for it yet.


RobinS wrote:
Show quoteHide quote
> It's called FormClosing now. (Irritating, isn't it?)
>
> There's also an event called FormClosed that will trigger *after*
> the form is closed.
>
> Robin S.
> --------------------------------------------------
> "cj" <cj@nospam.nospam> wrote in message
> news:evGoQ6sHHHA.3780@TK2MSFTNGP02.phx.gbl...
>> In VB2003I have been using an exit menu item that issues me.close()
>> then Private Sub Form1_Closing took care of closing everything down.
>> I don't see a closing event for form1 in VB2005.  What takes it's
>> place?
>
>
Author
13 Dec 2006 5:48 PM
Chris Dunaway
cj wrote:
> Irritating, yes.  I hope they had a good reason for it but ...
>

FormClosing has an argument that tells *why* the form closed.
Author
13 Dec 2006 8:56 PM
RobinS
That's a good thing. But they didn't have to change the
name from Closing to FormClosing. (Although actually,
I guess they changed it from Unload to FormClosing). They
didn't change the Load event to FormLoading. Where's the
consistency?  Oh, the drama of it all!   ;-)

Robin S.
----------------
Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1166032097.346956.253130@j72g2000cwa.googlegroups.com...
> cj wrote:
>> Irritating, yes.  I hope they had a good reason for it but ...
>>
>
> FormClosing has an argument that tells *why* the form closed.
>
Author
13 Dec 2006 9:35 PM
Chris Dunaway
RobinS wrote:
> That's a good thing. But they didn't have to change the
> name from Closing to FormClosing. (Although actually,

Since the Closing event is still present (though deprecated), perhaps
they changed the name to avoid causing any further backwards
compatibility problems.
Author
13 Dec 2006 11:19 PM
RobinS
Ah, I see. Fair enough. Well, they could call it "George"
and I'd still use it. I'm just *that* flexible.  ;-)

Robin S.
----------------------------
Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1166045712.478193.99260@73g2000cwn.googlegroups.com...
> RobinS wrote:
>> That's a good thing. But they didn't have to change the
>> name from Closing to FormClosing. (Although actually,
>
> Since the Closing event is still present (though deprecated), perhaps
> they changed the name to avoid causing any further backwards
> compatibility problems.
>