I have the following code snippet to close my winform application:
private void frmAgent_FormClosing(object sender, FormClosingEventArgs e){
if (MessageBox.Show("Deseja realmente fechar o sistema?", "Atenção!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
!= DialogResult.Yes)
{
e.Cancel = true;
}
}
The application closes, but unfortunately the process still runs in the task manager. What can I do to kill the process when I close the application?