D
Dakkar
How can i control my program when someone kill it's process from the
taskmanager
my dispose script is working well if i close the program manually but
if i kill it from taskmanager its not working
how can i fix it
my dispose script is like this
protected override void Dispose(bool Disposing)
{
if (Disposing)
{
if (components != null)
{
components.Dispose();
}
}
Process[] procuo = Process.GetProcesses();
for (int i = 0; i < procuo.Length; i++)
{
if
(procuo.ProcessName.Equals("client"))
{
procuo.Kill();
}
}
base.Dispose(true);
}
taskmanager
my dispose script is working well if i close the program manually but
if i kill it from taskmanager its not working
how can i fix it
my dispose script is like this
protected override void Dispose(bool Disposing)
{
if (Disposing)
{
if (components != null)
{
components.Dispose();
}
}
Process[] procuo = Process.GetProcesses();
for (int i = 0; i < procuo.Length; i++)
{
if
(procuo.ProcessName.Equals("client"))
{
procuo.Kill();
}
}
base.Dispose(true);
}