Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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  
}  
Source by www.c-sharpcorner.com #
 
PREVIOUS NEXT
Tagged: #winforms #messagebox #button
ADD COMMENT
Topic
Name
9+6 =