Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how do can I code the messagebox in VB to display background color
Posted
Comments
Dave Kreskowiak 8-Dec-10 17:07pm    
What are you asking about?? Are you trying to change the background color of a MessageBox or are you trying to display the color value of some backcolor property of a control??

You cannot change the backcolor of a MessageBox. The MessageBox is system generated and will always use the system color theme. If you want a customized MessageBox, you'll have to make your own using a Form, exposing the proper properties, and supplying the rendering code to alter the form as appropriate.

I think, you want a messagebox with custom colors.
You cannot change the background of a messagebox, but you can create your own control.
 
Share this answer
 
You might be able to derive a new class from MessageBox, and then intercept the paint event or something like that. Be a programmer, and try stuff out.

It might be easier to just code up your own MessageBox class. It shouldn't be that hard.
 
Share this answer
 
v2

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