private void btnclose_Click(object sender, EventArgs e)
{
string message = "Do you want to close this window?";
string title = "Tools Management System";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show(message, title, buttons);
if (result == DialogResult.Yes)
{
this.Dispose();
}
else
{
// Do something
}
}
{
string message = "Do you want to close this window?";
string title = "Tools Management System";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show(message, title, buttons);
if (result == DialogResult.Yes)
{
this.Dispose();
}
else
{
// Do something
}
}
No comments:
Post a Comment