Hi,
It's not possible to prevent that a user kills your process using the "End Process" button. You can only cancel that your application will be closed if the user uses the "End Task" button:
public Form1()
{
InitializeComponent();
this.FormClosing += Form1_FormClosing;
}
void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.TaskManagerClosing)
{
e.Cancel = true;
}
}
Hope this helps.