How do I change the button text for the MessageBox ?

  • Thread starter Thread starter RickDee
  • Start date Start date
R

RickDee

Pls help.

What I am trying to do is to change the text of the MessageBox. For example,
when we use :

MessageBox.Show("Pass or Fail ?", "Dialog Title", MessageBoxButtons.YesNo);

Then we will have the Yes and No button for user to press. Now how can I
have the enum struct option where I can put MessageBoxButtons.PassFail which
will display Pass and Fail buttons on the message box ? Is ther anyway to do
this ?

Thanks
Regards
 
Hi

Check out the following msdn article:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfSystemWindowsFormsMessageBoxClassShowTo
pic.asp

HTH
Ravikanth[MVP]

-----Original Message-----
Pls help.

What I am trying to do is to change the text of the MessageBox. For example,
when we use :

MessageBox.Show("Pass or Fail ?", "Dialog Title", MessageBoxButtons.YesNo);

Then we will have the Yes and No button for user to press. Now how can I
have the enum struct option where I can put
MessageBoxButtons.PassFail which
 
Are you sure on this ??

I know there is a quite a few overload for this MessageBox.show, but I am
looking for one which I can say change the Yes and No button to Pass and
Fail button.



*********************************
 
i guess you have to write your own dialog window
then set the dialog result on the buttons to be Yes and No
 
I'm fairly certain the original poster has moved on after 6 years. The
question was how to change the buttons from Yes/No to Pass/Fail.

Original reply: Fail.
 
Back
Top