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 HussainPosted Jul 25, 2013, 2:24 AM
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
Sudarshan RayPosted Jul 25, 2013, 2:22 AM
Sudarshan RayPosted Jul 25, 2013, 2:21 AM
Iftikar HussainPosted Jul 25, 2013, 2:21 AM
Regards,
Iftikar
Sudarshan RayPosted Jul 25, 2013, 2:18 AM
Iftikar HussainPosted Jul 25, 2013, 2:05 AM
Try like this
Process.Kill instead of process.CloseMainWindow
Regards.
Iftikar