I need to change the message box control buttons Yes
to Continue
and No
to Close
. How
do I change the button text?
Here is my code:
DialogResult dlgResult = MessageBox.Show("Patterns have been logged successfully", "Logtool", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
Just add a new form and add buttons and a label. Give the value to be shown and the text of the button, etc. in its constructor, and call it from anywhere you want in the project.
Add some label and buttons.
Initialize the value in constructor and call it from anywhere.
Here is the content of the file MessageBoxManager.cs
This may not be the prettiest, but if you don't want to use the MessageBoxManager, (which is awesome):
I didn't think it would be that simple! go to this link: https://www.codeproject.com/Articles/18399/Localizing-System-MessageBox
Download the source. Take the MessageBoxManager.cs file, add it to your project. Now just register it once in your code (for example in the Main() method inside your Program.cs file) and it will work every time you call MessageBox.Show():
See this answer for the source code here for MessageBoxManager.cs.