Changing text on button in MessageBox
-
Hi all, How could i change text on button in MessageBox? Ex : If i write :
MessageBox.Show("How to change text","Question",MessageBoxButtons.OKCancel)
-> MessageBox will be shown with "OK" and "Cancel" button. But i want to change text "OK" -> "That's right" and "Cancel" -> "That's not right". How could i do that? -
Hi all, How could i change text on button in MessageBox? Ex : If i write :
MessageBox.Show("How to change text","Question",MessageBoxButtons.OKCancel)
-> MessageBox will be shown with "OK" and "Cancel" button. But i want to change text "OK" -> "That's right" and "Cancel" -> "That's not right". How could i do that?You can't. The things you see in a MessageBox are not cusomtizable. You'll have to create your own form class that provides this functionality. It's not that hard. It's just a normal form with a couple of buttons and a label. Maybe even a picturebox if you want.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi all, How could i change text on button in MessageBox? Ex : If i write :
MessageBox.Show("How to change text","Question",MessageBoxButtons.OKCancel)
-> MessageBox will be shown with "OK" and "Cancel" button. But i want to change text "OK" -> "That's right" and "Cancel" -> "That's not right". How could i do that?hellllo ctlqt, Dave is correct "The things you see in a MessageBox are not cusomtizable" U can use form.showDialog() method to show ModelDialog, just create a form looklike message box and call it as modelDialog box regards, koolprasad2003:) Be a good listener...Because Opprtunity knoughts softly...N-Joy