TCnProcess.EnableRaisingEvents Property

Gets or sets whether the OnExited event should be raised when the process terminates.

Namespace: CNClrLib.Component.Process
 property EnableRaisingEvents: Boolean read GetEnableRaisingEvents write SetEnableRaisingEvents default False;

Property Value

Type: Boolean

true if the OnExited event should be raised when the associated process is terminated (through either an exit or a call to Kill()); otherwise, false. The default is false. Note that the OnExited event is raised even if the value of EnableRaisingEvents is false when the process exits during or before the user performs a HasExited check.

The EnableRaisingEvents property suggests whether the component should be notified when the operating system has shut down a process. The EnableRaisingEvents property is used in asynchronous processing to notify your application that a process has exited. To force your application to synchronously wait for an exit event (which interrupts processing of the application until the exit event has occurred), use the WaitForExit method.