Make text in msgbox bold

Posted on 2009-02-09
Last Modified: 2013-11-26
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.  
Question by:Mike_Stevens
    LVL 33

    Accepted Solution

    LVL 69

    Expert Comment

    by:Éric Moreau
    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

    Expert Comment

    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
    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:

    this. Showdialog ();


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now