1
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 is still running in the task manager. What can I do to kill the process by closing the application ?
frmAgent
is the only application form? How is your class containing the methodMain
?– mateusalxd