Learn how to a build a cloud-first strategyRegister Now

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

Make text in msgbox bold

Is there any way when displaying a message box in a windows form application to make certain parts of the message bold?  I use the following syntax when displaying a message box:

Msgbox("Are you sure you want to delete ABC Company from the database")

I would like to be able to make "ABC Company" appear as bold so that is stands out to the user.  
0
Mike_Stevens
Asked:
Mike_Stevens
1 Solution
 
jppintoCommented:
0
 
Éric MoreauSenior .Net ConsultantCommented:
if you are ready to build your own messagebox and place a richtextbox control to display the message, it would work.

to create your own messagebox, see http://www.emoreau.com/Entries/Articles/2006/01/A-custom-MessageBox.aspx
0
 
rajputamitdCommented:
you can create a form who will have the same look as the MessageBox.
with 1 Richtextbox for the text you want to display, 2 buttons (OK and
cancel).
In your form, you write a function like:

public void show (string msg, string Highlighttext, Color c)
{
this. Richtextbox.text = msg;

// here comes the function to find and highlight text
// Richtextbox has functions like Find, SelectionColor,...
// example in VB At: http://support.microsoft.com/kb/154884

this. Showdialog ();
}

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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