Aracılığıyla paylaş


Unload Event

Occurs when an object is released.

Unload is the last event to occur before a form set or form is released.

PROCEDURE Object.Unload

Remarks

Applies To: Form | FormSet

Unload occurs after the Destroy event and after all the contained objects have been released. In addition, Unload occurs depending on the type of object:

  • Form objects are released in code when the object variable that refers to the form is released or when its form set is released.

  • Form set objects are released in code when the object variable that refers to the form set is released.

If a container object, such as a form set, contains objects, the Unload event for the container object occurs after the Unload events for the objects it contains. For example, a form set containing one form that contains one control (a CommandButton) is released in this order:

  1. FormSet Destroy event

  2. Form Destroy event

  3. CommandButton Destroy event

  4. Form Unload event

  5. FormSet Unload event

To return a value to the TO VarName clause in the DO FORM command, use the RETURN command in the Unload event. For more information, see DO FORM Command.

See Also

Reference

Destroy Event

QueryUnload Event

Destroy Event

DO FORM Command

RETURN Command

Other Resources

Events (Visual FoxPro)

Language Reference (Visual FoxPro)