Hi all,
One I start a process (say WMPlayer) with Process.Start.
I want to terminate the process with process.CloseMainWindow.
Things go as expected when I am debugging the code, but does not happen when I am executing the executable. The process.CloseWindow does not work, as in process does not get killed.
Thanks
Sudarshan
Loading

Iftikar HussainRank #423 · 5.9K reputationPosted Jul 24, 2013, 10:05 PM EDT
Try like this
Process.Kill instead of process.CloseMainWindow
Regards.
Iftikar
Sudarshan Ray8 reputationPosted Jul 24, 2013, 10:18 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 24, 2013, 10:21 PM EDT
Regards,
Iftikar
Sudarshan Ray8 reputationPosted Jul 24, 2013, 10:21 PM EDT
Sudarshan Ray8 reputationPosted Jul 24, 2013, 10:22 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 24, 2013, 10:24 PM EDT
http://msdn.microsoft.com/en-in/library/system.diagnostics.process.closemainwindow(v=vs.71).aspx
http://stackoverflow.com/questions/2948510/process-closemainwindow-not-working
Regards,
Iftikar