[DllImport("user32.dll", SetLastError = true)]
static extern bool EndTask(IntPtr hWnd, bool fShutDown, bool fForce);
[DllImport("user32.dll")]
public static extern bool EndTask(IntPtr hWnd, bool fShutDown,bool fForce);
private void label1_Click(object sender, EventArgs e)
{
EndTask(this.Handle, true,true);
}