NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Application ApplicationExit Event

Occurs when the application is about to shut down.

The following declaration shows the syntax for a method that handles the ApplicationExit event.

[Visual Basic]
Private Sub ApplicationName_ApplicationExit( _
   ByVal sender As Object, _
   ByVal e As EventArgs _
)
[C#]
private void ApplicationName_ApplicationExit(
   object sender,
   EventArgs e
);
[C++]
private: void ApplicationName_ApplicationExit(
   Object* sender,
   EventArgs* e
);
[JScript]
private ApplicationName_ApplicationExit(
   sender : Object,
   e : EventArgs
);

Parameters

sender
The source of the event.
e
An EventArgs that contains the event data. The following EventArgs properties provide information specific to this event.
Property Description
ExtendedInfo
Holds a reference to an object that manages the event's state.

Remarks

You should attach the event-handling methods to the Exit event to perform any unhandled, required tasks before the application stops running. You can close any files opened by this application, or dispose objects that were not reclaimed by garbage collection.

See Also

Application Class | Application MembersTopic | System.WinForms Namespace