Yes No Cancel : MessageBox : GUI Windows Form C# Source Code


Custom Search

C# Source Code » GUI Windows Form » MessageBox »

 

Yes No Cancel








    
 
using System;
using System.Windows.Forms;

public class MainClass {

    public static void Main() {
        switch (MessageBox.Show("Do you want to create a new file?",
                            "WonderWord",
                            MessageBoxButtons.YesNoCancel,
                            MessageBoxIcon.Question)) {
            case DialogResult.Yes:
                // "Yes" processing
                break;

            case DialogResult.No:
                // "No" processing
                break;

            case DialogResult.Cancel:
                // "Cancel" processing
                break;
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo GUI Windows Form
» MessageBox