Q: Modify text on buttons in the MessageBox, possible?

  • Thread starter Thread starter Visual Systems AB \(Martin Arvidsson\)
  • Start date Start date
V

Visual Systems AB \(Martin Arvidsson\)

Hi!

Is it possible to modify the text in the MessageBox class?

There are a couple of buttons with a standard text. What i want is to set a
text of my own.

I have inherited the class, but there are no suitable methods to override
for handeling this.

Is there a base class that i need to alter?

Regards
Martin Arvidsson
 
Hello,

Sorry, but I don't think you can. However, you CAN create your own dialogs.
Simply create a standard form. Add two buttons (OK & Cancel) set the
DialogResult property for theese buttons, set the Form.AcceptButton and
Form.CancelButton to theese buttons, change the Form.BorderStyle to
FixedDialog, remove the MaximizeBox and MinimizeBox. Use the
Form.ShowDialog() method as such:
if (new myDialog().ShowDialog() == DialogResult.OK) {
// accept button
}

Now you should have a perfectly looking CUSTOM dialogbox :)
 
Back
Top