I have a WPF program that needs to detect if another software is opened or not. If it is opened, my program will connect to it automatically:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
if(!DataModel.IsConnected)
{
connect();
}
}
However, in this way it can only build connection when that software is opened before I run the WPF window. If I want the WPF program can always detect if the software is open - even if the software is opened after I run the WPF window.