Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 764875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:47:59+00:00 2026-05-14T16:47:59+00:00

is there a way to draw mixed-formatted text in .Net 2.0? I’m looking for

  • 0

is there a way to draw mixed-formatted text in .Net 2.0? I’m looking for something similar to

System.Drawing.Graphics.DrawString()

My problem with this method is that it allows only one format style for the whole text. But I need to draw text that has different format styles (e.g. a part of the text shall be underlined, another part bold and so on).

Thanks a lot!
Oliver

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:48:00+00:00Added an answer on May 14, 2026 at 4:48 pm

    I’m pulling an answer right from the book WPF in Action — You seem to have 2 options:

    • Create a custom control and define your own markup for specifying fonts. Aside from this being a lot of work, you’d also have to rely on the the notoriously inaccurate methods for measuring the width of text (so that you could figure out where to put the next word).

    • Use the RTF control. This is extremely heavy, and you’d end up spending a lot of time making it look like text instead of an edit control, and you’d have to work with RTF to get the text the way you wanted.

    So I guess the answer is the RTF control (aka. RichTextBox) if you’re stuck with .NET 2.0 — WinForms. Well, unless you want to write your own control… 🙂

    The book also mentions taking various label and/or textbox controls and manually (or programatically) aligning them and setting to have different font values, etc. But I assume you want to avoid that, right?

    EDIT

    I’m leaving my above answer in-place. Here’s my new answer to you:

    Look into GDI+ — Here is a link to a tutorial at C# Corner which should introduce you to GDI+: http://www.c-sharpcorner.com/uploadfile/mahesh/gdi_plus12092005070041am/gdi_plus.aspx

    And here is a link that should show you how to use GDI+ with a Bitmap/Image: http://ondotnet.com/pub/a/dotnet/2003/05/05/gdiplus.html

    Good luck!

    Also, you may want to pick up a book on this as GDI+ is a pretty heavy topic. I did most of my learning about GDI+ via the book Pro .NET 2.0 Windows Forms and Custom Controls in C# (It’s a good book in my experience.) Although since you aren’t exactly interested in designing custom controls for WinForms, you may want to look for a book geared more directly toward GDI+.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to draw text in a DisplayObject or Shape using only
In Java SWT, is there a way to draw text on a transparent shell
Is there a way to do a mysql database query in Corel Draw 13(X3)?
Is there any way to capture the MouseDown even from the .NET 2.0 TextBox
Is there a way to draw an arc using points in JavaScript?? I need
Is there a way to draw smooth animation in javascript? In directx I'm using
Is there any way to draw on the desktop background in WIN32 and also
Is there a way to draw a line on a graph (or at least
Is there a way to draw many filled circles using one vertex array. Is
Is there a way to draw a cube like this and as a result,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.