Changing Text on MessageBoxButtons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am using VS 2003 to write a C# application. I want to display a MessageBox but I want two buttons: "Repeat" and "Cancel". I realize there is a RetryCancel option but I would really like it to say "Repeat". Is there a way to do this?

Thank you,
Joe
 
Only way to do it is to make your own component which derived from the MessageBox Class
 
LEBRUN Thomas said:
Only way to do it is to make your own component which derived from the
MessageBox Class

How (comment)?
MessageBox only exposes the Shared/static Show method.
E.g. in VB.NET this fails:

Public Class MyMessageBox
Inherits System.Windows.Forms.MessageBox
....
End Class

Regards,
Marius.
MessageBox but I want two buttons: "Repeat" and "Cancel". I realize there
is a RetryCancel option but I would really like it to say "Repeat". Is
there a way to do this?
 
That would require a windows hook
It's *much* easier to roll your own

/claes

Joe Thompson said:
Hi,

I am using VS 2003 to write a C# application. I want to display a
MessageBox but I want two buttons: "Repeat" and "Cancel". I realize there
is a RetryCancel option but I would really like it to say "Repeat". Is
there a way to do this?
 
Hi,

Just to add some info to the answer. I agree with Claes that is better to
write your own rather than to use windows hooks. However there was an
article in MSDN Magazine about how to costumize the message box.

The article is called
" Using Windows Hooks to Enhance MessageBox in .NET " by Dino Esposito
and can be found in the November 2002 issue of MSDN magazine or online at

http://msdn.microsoft.com/msdnmag/issues/02/11/cuttingedge/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top