Answers for "messagebox in c# windows form"

C#
27

c# MessageBox

MessageBox.Show("text", "title", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Posted by: Guest on March-02-2020
2

winforms messagebox with button

string message = "Do you want to close this window?";  
string title = "Close Window";  
MessageBoxButtons buttons = MessageBoxButtons.YesNo;  
DialogResult result = MessageBox.Show(message, title, buttons);  
if (result == DialogResult.Yes) {  
    this.Close();  
} else {  
    // Do something  
}  
Posted by: Guest on April-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language