ActiveX run mode terminate event does not fire 
Author Message
 ActiveX run mode terminate event does not fire

I have a project group containing an executable project and an ActiveX
project.
I place my ActiveX control on the exe form and then run it (fine so far)
If I then stop my application running using the stop button in VB, as
opposed to closing the form by clicking the X box (top right) the terminate
event does not fire, in fact nothing seems to fire. Does anyone know how I
can get around this "feature" ?

        Anthony J. Elcocks



Mon, 10 Jul 2000 03:00:00 GMT  
 ActiveX run mode terminate event does not fire

Nope; Microsoft has documented the problems with
attempting to stop using the Stop button. and says
simply 'Don't do it'

--
Ron Ruble
Raffles Software Development, Inc.


Quote:
>I have a project group containing an executable project and an ActiveX
>project.
>I place my ActiveX control on the exe form and then run it (fine so far)
>If I then stop my application running using the stop button in VB, as
>opposed to closing the form by clicking the X box (top right) the terminate
>event does not fire, in fact nothing seems to fire. Does anyone know how I
>can get around this "feature" ?

> Anthony J. Elcocks



Mon, 10 Jul 2000 03:00:00 GMT  
 ActiveX run mode terminate event does not fire

The terminate event of a class or control is not called if the application
ends 'abnormally'.  The memory is just dumped.  Pressing the stop button is
similar to an abnormal termination, so the event wont happen.

Have a look at 'Terminate Event' in the VB Help, or Books online


Quote:
>I have a project group containing an executable project and an ActiveX
>project.
>I place my ActiveX control on the exe form and then run it (fine so far)
>If I then stop my application running using the stop button in VB, as
>opposed to closing the form by clicking the X box (top right) the terminate
>event does not fire, in fact nothing seems to fire. Does anyone know how I
>can get around this "feature" ?

> Anthony J. Elcocks



Tue, 11 Jul 2000 03:00:00 GMT  
 ActiveX run mode terminate event does not fire

OK Microsoft ... so how do I stop my users from hitting the stop button ?

If I am creating a control for other developers which has subclassing and
various other methods that require resources to be deleted/released that
could otherwise cause a gpf or system crash, how do I trap an "abnormal
termination". The stop button is part of the Visual Basic interface.
ActiveX controls and the accompanying technology are supposed to interact
with that.

"We have the technology ... just don't use it !"

--
        Anthony J. Elcocks,
        Senior Software Engineer,
        Thomson & Thomson

        Tel: (617) 479 1600 x7748
        Fax: (617) 786 8255



Fri, 14 Jul 2000 03:00:00 GMT  
 ActiveX run mode terminate event does not fire

    You can't; this isn't just your control, this is the VB IDE.
Even outside of ActiveX controls, Microsoft documents
not to use the stop button.
    If the developers use any window subclassing or
any of a dozen different operations with APIs requiring
cleanup, they can't use the stop button. I agree, they
should have done something about it, but they didn't
and we can't.

--
Ron Ruble
Raffles Software Development, Inc.


Quote:
>OK Microsoft ... so how do I stop my users from hitting the stop button ?

>If I am creating a control for other developers which has subclassing and
>various other methods that require resources to be deleted/released that
>could otherwise cause a gpf or system crash, how do I trap an "abnormal
>termination". The stop button is part of the Visual Basic interface.
>ActiveX controls and the accompanying technology are supposed to interact
>with that.

>"We have the technology ... just don't use it !"

>--
> Anthony J. Elcocks,
> Senior Software Engineer,
> Thomson & Thomson

> Tel: (617) 479 1600 x7748
> Fax: (617) 786 8255




Fri, 14 Jul 2000 03:00:00 GMT  
 ActiveX run mode terminate event does not fire


Quote:
>I have a project group containing an executable project and an ActiveX
>project.
>I place my ActiveX control on the exe form and then run it (fine so far)
>If I then stop my application running using the stop button in VB, as
>opposed to closing the form by clicking the X box (top right) the terminate
>event does not fire, in fact nothing seems to fire. Does anyone know how I
>can get around this "feature" ?
>    Anthony J. Elcocks

VB calls the unload (and terminate) events when the user closes a form
using the mouse or when you do it by specifically unloading the form.
The same apparently is true with ActiveX controls. However, chosing
the stop button or using the menu's Run-End command will not do this.
Nor will using the END statement! Therefore, DON'T press the stop
button or use the END statement anymore.

Of course, I do use the stop button, since it is really only important
if you make API calls or reset your window tables with SetWindowLong.



Sat, 15 Jul 2000 03:00:00 GMT  
 ActiveX run mode terminate event does not fire

Since the control in question is to be for use in the design environment
.. how do I stop a developer from doing that ... we all do it !



Quote:

> >I have a project group containing an executable project and an ActiveX
> >project.
> >I place my ActiveX control on the exe form and then run it (fine so far)
> >If I then stop my application running using the stop button in VB, as
> >opposed to closing the form by clicking the X box (top right) the
terminate
> >event does not fire, in fact nothing seems to fire. Does anyone know how
I
> >can get around this "feature" ?

> >       Anthony J. Elcocks
> VB calls the unload (and terminate) events when the user closes a form
> using the mouse or when you do it by specifically unloading the form.
> The same apparently is true with ActiveX controls. However, chosing
> the stop button or using the menu's Run-End command will not do this.
> Nor will using the END statement! Therefore, DON'T press the stop
> button or use the END statement anymore.

> Of course, I do use the stop button, since it is really only important
> if you make API calls or reset your window tables with SetWindowLong.



Sat, 15 Jul 2000 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Terminate Event on ActiveX user control not firing

2. Terminate Event does not run for object in ActiveX DLL

3. Terminate Event not Fired

4. Reply Inspector not firing terminate event???

5. Terminate Event Not Firing

6. Terminate Event Not Firing

7. terminate event not firing

8. ActiveX control causing subform's load event not to fire

9. ActiveX custom event not firing HELP -- URGENT!

10. ActiveX custom event not firing HELP -- URGENT!

11. Destroying ActiveX EXE Object Does Not Fire The Class_Terminate Event

12. VB6 ActiveX Control -- Change Event Not Firing

 

 
Powered by phpBB® Forum Software