public partial class Form1 : Form { public System.Management.ManagementEventWatcher mgmtWtch; public Form1() { InitializeComponent(); mgmtWtch = new System.Management.ManagementEventWatcher("Select * From Win32_ProcessStartTrace"); mgmtWtch.EventArrived += new System.Management.EventArrivedEventHandler(mgmtWtch_EventArrived); mgmtWtch.Start(); } private void mgmtWtch_EventArrived(object sender, System.Management.EventArrivedEventArgs e) { MessageBox.Show((string)e.NewEvent["ProcessName"]); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)