Results 1 to 3 of 3

Thread: What the terminate event is used for?

  1. #1

    Thread Starter
    Addicted Member Eric_B's Avatar
    Join Date
    May 2001
    Location
    home sweet home
    Posts
    130

    What the terminate event is used for?

    thanx in advance

  2. #2
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    I may be wrong here but I think it is fired after the unload event when the form is totally freed from memory by the

    VB Code:
    1. Set Form = Nothing

    statement

  3. #3
    gaffa
    Guest
    From the MSDN:

    Occurs when all references to an instance of a Form, MDIForm, User control, Property Page, Webclass, DHTML Page Designer, or class are removed from memory by setting all the variables that refer to the object to Nothing or when the last reference to the object falls out of scope.

    Syntax

    Private Sub object_Terminate( )

    The object placeholder represents an object expression that evaluates to an object in the Applies To list.

    Remarks

    For all objects except classes, the Terminate event occurs after the Unload event.

    The Terminate event isn't triggered if the instances of the form or class were removed from memory because the application terminated abnormally. For example, if your application invokes the End statement before removing all existing instances of the class or form from memory, the Terminate event isn't triggered for that class or form.
    - gaffa

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width