Display Question messagebox and check its result : MessageBox « GUI Windows Form « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Collections Data Structure
3. Components
4. Database ADO.net
5. Development Class
6. Event
7. File Stream
8. GUI Windows Form
9. Language Basics
10. Network
11. Office
12. Regular Expressions
13. Services Event
14. Thread
15. Web Services
16. Windows
17. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
C# / C Sharp » GUI Windows Form » MessageBoxScreenshots 
Display Question messagebox and check its result
Display Question messagebox and check its result


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

public class Test{
    [STAThread]
    static void Main() 
    {
            DialogResult reply = MessageBox.Show("Question?",
            "Yes or No Demo",MessageBoxButtons.YesNo,MessageBoxIcon.Question);
      
            if (reply == DialogResult.Yes){
               MessageBox.Show("Yes");
            else {
               MessageBox.Show("No");
            }
    }
}
           
       
Related examples in the same category
1. MessageBox OptionsMessageBox Options
2. MessageBox with OK button and information iconMessageBox with OK button and information icon
3. Message box builderMessage box builder
4. Information message boxInformation message box
5. A message boxA message box
w___w_w_._j___a_va___2s_._c_o_m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.