How can i make it so when i Click the X at the Top Right of the Console it automaticly sends messages saying Blabla saved, and it exits saving everthing, Its just like the /exit command
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case Keys.Control | Keys.Escape:
{
// Save everything.
Environment.Exit(1);
return true;
}
}
return false;
}