Just create your own using a form. A messagebox is a standard dialog and shows the colours based on the colour scheme of the PC it is shown on - as far as i know, but whenever i want to customise the messagebox i just create a form modify it to my needs and show that with a message.
Actually, if you try to Inherit the messagebox, you'll get a warning stating that you'll have to add a constructor since the only constructor for the messagebox class is Private (thus beginning the metaproblem) - when you create a constructor, you must immediately call the base class constructor, but (obviously) you can't call the base class constructor, because it is private.
And I think the MessageBox.Show is just a dummy class that actually creates a new form from scratch and shows it - it's not an actual form. It doesn't even inherit form.
Make your own messagebox class that allows you to change the color. It will be useful for when you will ( YOU WILL! ) want to change those things in the future.
Just out of interest why would you want to change the colour of the MessageBox? If a user has chosen a colour scheme from windows control panel then your message box should follow that; otherwise you could end up with severe colour clashes, hard to read displays and would also be causing problems for the visual impaired who happen to have selected a high contrast scheme.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.