PC Review


Reply
Thread Tools Rate Thread

How to draw a border around text but with round corners?

 
 
Eitan
Guest
Posts: n/a
 
      26th Nov 2007
Hello,
I would like to draw a border around some text I am drawing on the screen (I
am using g.DrawString(…) function). I would like the edges of the boarder to
be rounded rather than square (90 degrees).

Any idea how can I achieve that?

Thanks
EitanB


 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      26th Nov 2007
EitanB,

You can look into creating a custom Pen object to perform the drawing,
and then set the EndCap property to LineCap.Round. You might even be able
to set it to Custom and use a class that extends from CustomLineCap.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Eitan" <(E-Mail Removed)> wrote in message
news:E58E8D31-77AF-4FB6-8256-(E-Mail Removed)...
> Hello,
> I would like to draw a border around some text I am drawing on the screen
> (I
> am using g.DrawString(.) function). I would like the edges of the boarder
> to
> be rounded rather than square (90 degrees).
>
> Any idea how can I achieve that?
>
> Thanks
> EitanB
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
draw corners Tim Myers Microsoft Excel Misc 4 11th Mar 2010 08:56 AM
Round corners of text box bmw121199 Microsoft Powerpoint 2 25th Nov 2009 06:10 PM
How do I put a border round text AND picture - Word97? DavidF Microsoft Word New Users 10 28th Apr 2006 07:41 PM
Draw border above specific text string Rashid Khan Microsoft Excel Programming 3 8th Jul 2004 07:19 PM
How to draw this region: round corners rectangle? Alberto Silva - MVP Microsoft Dot NET Compact Framework 3 13th Jan 2004 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:10 PM.