I have a windows form application that opens another vendor's application. If the vendor's application is not running, my code opens it and it becomes visible as expected. However, if the vendor's application is already running minimized or in the system tray, I can't make it visible when I call Process.Start()
. Is there a way to make a currently running application visible/shown whether if it is minimized or in the system tray?
This is my code to open the other application which only works if the VendorProgram.exe
is not running. If VendorProgram.exe
is running but minimized it doesn't make it visible/shown, which is what I need.
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = "C:\\Program Files (x86)\\VendorProgram.exe";
startInfo.WindowStyle = ProcessWindowStyle.Normal;
Process p = Process.Start(startInfo);
EDIT: In case it isn't clear, I am not trying to make an application open itself, I am trying to open a separate vendor's application from my application.