We help IT Professionals succeed at work.

Display bold fonts in MessageBox Windows c#

10,762 Views
Last Modified: 2013-11-27
Hi All,

Is there a way other than creating a custom form, for displaying bold fonts in messageBox? i have to display some if the words in message box as bold,,, if No ,, then can someone guide me to free ready made controls built on windows c#?

Thanks
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Abu HamdanEnterprise Architect, PM Expert

Author

Commented:
Hi,

The samples suggested have no ability to show text in bold,  if i am creating my own form,, what control do you suggest to be used to display the text?  how i will be able to send font like this:

Hello this is your <b>Prodcut Name</b>.

You cannot change this behavior of MessageBox. One solution is to derive your own MessageForm class from Form to display your message with font bold. Then call its ShowDialog method to show the form

Commented:
You can use rich text edit, set it to read-only.
Abu HamdanEnterprise Architect, PM Expert

Author

Commented:
Is there a way in rich text edit to display some portion of text as bold? and how?

Commented:
Place richtextbox on you form and assign rtf property:
richTextBox1.Rtf = @"{\rtf1\ansi This is {\b bold} text}"
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.