I am opening windows calculator in my MDI windows application and it gets open
through a child form which is a part of mdi form.I am not able to close the windows calc
even when my form gets closed.
code:
System.Diagnostics.Process p = null;
public bool calcinstance()
{
if (p == null)
{
p = new Process();
p.StartInfo.FileName = "Calc.exe";
p.Start();
return false;
}
else
{
p.Close();
p.Dispose();
return true;
}
}
on button click I want to close calc.
p.close();
or
p.kill(); does not work .No error Message.