Confirm rename buttons

johnkainn used Ask the Experts™
How do I rename OK Cancel Buttons in Confirm popup window?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

The easiest would be to write your own messagebox if you want to have full control of it.
use messagebox

the first part in " "  is the message the second part is the name that appears on the top of the popupwindow, MessageBoxButtons has many button choices for the buttons you can use. MessageBoxIcon is the x or hand or many different icons that are posted in the messagebox

            DialogResult result1 = MessageBox.Show("You must enter a name.", "Name Entry Error",
         MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);

            if (result1 == DialogResult.Yes)
                //do some stuff here
            if (result1 == DialogResult.No)
                //do some other stuff here

Open in new window

CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.


The asker asked for a way to change Yes, No, Cancel buttons. If you have more input to that, I would also appreciate that.

are you talking about a javascript confirm-box?
afaik confirm is called via javascript and not via a CLR related language.
1 solution: You have to override the Onpaint event of the button in the message box.
2 solutino: hook the message box:
3 solution: write  your own message box:

both liks I have provided contain sample project code for you to download and look at as well as detailed steps on how it was created.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial