Hello
Am curious.. whether can i handle the cleaning up of an object. If i kill my application from Task Manager.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.TaskManagerClosing)
{
e.Cancel = true;
MessageBox.Show("Application being shutdown from Task Manager","Caution",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
}
private void button1_Click(object sender, EventArgs e)
{
do{}while(true);
}
}
This method works if i end my application from the TASK MANAGER. But i want to know whether a similar handling is possible if i end my application by killing the process under which my application is running
Regards