SAM_AppExit is sent to an application after all of the application's windows have been destroyed (closed). When the user exits an application or switches from user mode to design mode, an application's form windows, dialog boxes, and table windows are destroyed. Following this, SAM_AppExit is sent to the application. You can perform clean-up tasks (such as disconnecting from a database) before the application terminates. This is the last message an application receives and it is only sent to the Application Actions section of the outline. Be sure not to reference any windows in your SAL statements when processing this message! Message Variables hWndForm None. hWndItem None. wParam None. IParam None. Example Application Actions On SAM_AppExit ! User is leaving application. Disconnect Sql Handle. Call SqlDisconnect ( hSql )

Namespace: PPJ.Runtime
Assembly: PPJ.Runtime.2 (in PPJ.Runtime.2.dll) Version: 2.0.1044.0 (2.0.1044.5276)

Syntax

C#
public const int SAM_AppExit

See Also