Show method with button and icon settings : MessageBox : GUI Windows Forms C# Examples


C# Examples » GUI Windows Forms » MessageBox »

 

Show method with button and icon settings









    
using  System;
using  System.Windows.Forms;

public  class  MainClass  {

        public  static  void  Main()  {
                DialogResult  dr  =  MessageBox.Show("Do  you  want  to  create  a  new  file?",
                                                                                    "WonderWord",
                                                                                    MessageBoxButtons.YesNoCancel,
                                                                                    MessageBoxIcon.Question);
                if  (dr  ==  DialogResult.Yes)  {
                        //  "Yes"  processing
                }  else  if  (dr  ==  DialogResult.No)  {
                        //  "No"  processing
                }  else  {
                        //  "Cancel"  processing
                }
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo GUI Windows Forms
» MessageBox