font outline

Posted on 2003-03-17
Medium Priority
Last Modified: 2013-12-03
Does anyone know if it is possible to create a image with text using 'Graphics.DrawString' or some other class or method, where the font has an outline in a different color?
Question by:Breedj
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

Nebulus_ earned 200 total points
ID: 8152686
this is tested into an Paint event of an pictureBox control:

string tstString = "Outlined String";
Font tstFont = new Font("Arial", 10);
int x0 = 10, y0 = 10;
SizeF strSize = e.Graphics.MeasureString(tstString, tstFont);
e.Graphics.DrawRectangle(Pens.Red, x0, y0, strSize.Width, strSize.Height) ;
e.Graphics.DrawString(tstString, tstFont, Brushes.Black, x0, y0);

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

770 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