Click here to Skip to main content
14,977,259 members
Please Sign up or sign in to vote.
1.11/5 (2 votes)
See more:
Hello All,
How to Change Background Color and Text property of Message Box Dialog in windows application. its very urgent for me. Plz Help Me.
Posted
Updated 21-Nov-16 23:10pm

If you are referring to the Messagebox class, as far as I know it is not possible to alter the background colour without altering system-wide settings, which will alter the background colour of all windows.

However a Messagebox is simply a Dialog so design your own. You can then surface any properties that you like, allowing you to change almost anything.

There are plenty of article here on Code Project as well as on the web for creating your own Dialogs.
   
Comments
Michel Godfroid 5-May-10 8:30am
   
You're right, I didn't realise he was referring to the Messagebox Class. Apologies :-)
Extended MessageBox .NET Assembly
http://www.news2news.com/vfp/?solution=5

Adjusts on the fly wide variety of MessageBox visual settings.

Adjustable features include message font and color, button captions, fonts and tooltips, dialog background, dialog position, dialog icon, timeout and more. Depending on message font selected, the dialog window automatically resizes itself to accommodate the message.

Additional controls that can be optionally displayed: check box, text input, web link, up to 3 extra buttons.

In your .NET code you still call regular MessageBox.Show. Extended MessageBox is not a custom-made dialog. This is still regular MessageBox with extended features added.

OS supported: XP, 2000, 2003, 2008 Vista, Win7 -- 32 or 64-bit.

Downloads include fully-functional trial version, and regular version with complete C# source code.
   
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900