If you want your form to not close when the No button is clicked, add an event handler to the Closing event instead of the Closed event. Your code would look like this:
Tienda.FormClosinng += new FormClosingEventHandler(Tienda_FormClosed);
...
private void Tienda_FormClosing(object sender, FormClosingEventArgs)
{
DialogResult result = MessageBox.Show("Seguro desea Cerrar esta ventana?", "Tienda", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if(result == DialogResult.No)
{
e.Cancel = true; // this will prevent the form from closing.
}
}
Tech, life, family, faith: Give me a visit. I'm currently blogging about: God-as-Judge, God-as-Forgiver The apostle Paul, modernly speaking: Epistles of Paul Judah Himango