i'm trying to find a way to find where i can code the 'X' button of the form. i've tried different ways that i've found on the net (even on msdn) but i couldn't manage to get it to work.
what i've mainly tried is this:
private void frmLogin_Close(object sender, System.ComponentModel.CancelEventArgs e)
{
DialogResult dr = MessageBox.Show("Are you sure you want to exit application?", "Exit", MessageBoxButtons.YesNo);
if (dr == DialogResult.Yes)
{
e.Cancel = true;
}
}
but this is not working
thanks 4 ur help

New Topic/Question
Reply




MultiQuote






|