corelibraries-devexpress-dot-data-dot-utils-dot-processstartpolicy-ae84cf17.md
Fires after a process has started.
Namespace : DevExpress.Data.Utils
Assembly : DevExpress.Data.Desktop.v25.2.dll
NuGet Packages : DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
public static event EventHandler Started
Public Shared Event Started As EventHandler
The Started event's data class is EventArgs.
Handle Starting and Started events to perform custom actions when a DevExpress UI control starts a process.
static void Main() {
ProcessStartPolicy.Starting += ProcessStartPolicy_Starting;
ProcessStartPolicy.Started += ProcessStartPolicy_Started;
// ...
}
private static void ProcessStartPolicy_Starting(object sender, System.ComponentModel.CancelEventArgs e) {
ProcessStartInfo psi = sender as ProcessStartInfo;
e.Cancel = !psi.FileName.Contains("www.devexpress.com");
}
private static void ProcessStartPolicy_Started(object sender, EventArgs e) {
Process process = sender as Process;
// ...
// Log.WriteMessage("process started");
}
Shared Sub Main()
AddHandler ProcessStartPolicy.Starting, AddressOf ProcessStartPolicy_Starting
AddHandler ProcessStartPolicy.Started, AddressOf ProcessStartPolicy_Started
' ...
End Sub
Private Shared Sub ProcessStartPolicy_Starting(sender As Object, e As CancelEventArgs)
Dim psi As ProcessStartInfo = CType(sender, ProcessStartInfo)
e.Cancel = Not psi.FileName.Contains("www.devexpress.com")
End Sub
Private Shared Sub ProcessStartPolicy_Started(sender As Object, e As EventArgs)
Dim process As Process = CType(sender, Process)
' ...
' Log.WriteMessage("process started")
End Sub
Read the following topic for more information: Suppress New Processes Initiated by .NET Controls.
See Also