[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8796
  • Last Modified:

Display bold fonts in MessageBox Windows c#

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
0
Abu Hamdan
Asked:
Abu Hamdan
2 Solutions
 
slado2Commented:
You can't change standard MessageBox behaviour and design. Your only chance is to write your own messagebox. Just inherit from Form and make it look and behave as you want.
0
 
jonorossiCommented:
These 2 articles which follow on from each other show you how to make your own custom messagebox which has all the features of the normal messagebox so it behaves very similar.

http://www.codeproject.com/useritems/A_Custom_Message_Box.asp
http://www.codeproject.com/useritems/Custom_Message_2.asp
0
 
Abu HamdanEnterprise Architect, PM ExpertAuthor 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>.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
m_tawfickCommented:
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
0
 
slado2Commented:
You can use rich text edit, set it to read-only.
0
 
Abu HamdanEnterprise Architect, PM ExpertAuthor Commented:
Is there a way in rich text edit to display some portion of text as bold? and how?
0
 
slado2Commented:
Place richtextbox on you form and assign rtf property:
richTextBox1.Rtf = @"{\rtf1\ansi This is {\b bold} text}"
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now