Hello Guys I have msg box when i press on yes its close that form which calls msg box how can i do when msg box dialogresult = ok close only himself
Set the DialogResault
property to None
for the button which its event handler open the MessageBox.
Good luck!
DialogResult result = MessageBox.Show("Click yes to close, otherwise click no.", "Message Box Test", MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
{
Application.Exit();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With