Display Question messagebox and check its result : MessageBox : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » MessageBox »

 

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");
            }
    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» MessageBox