0

hi all just i wanna know how can i use condition with message box
i used the statment:

MessageBox.Show("Are you Sure?","collection", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
           if(DialogResult.Yes=) ;
           {
               this.Hide();
               MessageBox.Show(M, "collection", MessageBoxButtons.OK);
           }

but its dont work can any one hel plz im so beginner at c#.......


*how i can use timer count 60 min from 60-0 show the countdown in lable for more then one form........:)

Edited by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by mirfan00
1

Something like

DialogResult result = MessageBox.Show("Are you Sure?","collection", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
    if(result == DialogResult.Yes)
    {
        this.Hide();
        MessageBox.Show(M, "collection", MessageBoxButtons.OK);
    }

??

Votes + Comments
Good answer.
0

Hello Dear
Try this one

DialogResult = MessageBox.Show("Are you Sure?","collection", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
       if(DialogResult == DialogResult.Yes) ;
       {
           this.Hide();
           MessageBox.Show(M, "collection", MessageBoxButtons.OK);
       }

Edited by Reverend Jim: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.