PC Review


Reply
Thread Tools Rate Thread

Determining Size of Graphics.DrawString

 
 
robfarmergt@gmail.com
Guest
Posts: n/a
 
      3rd Aug 2006
I want to be able to call Graphics.DrawString and determine the
dimensions (height and width) what what was just drawn. Does anyone
know a way to determine this?

Thanks,
Rob

 
Reply With Quote
 
 
 
 
Benjamin
Guest
Posts: n/a
 
      3rd Aug 2006

(E-Mail Removed) wrote:
> I want to be able to call Graphics.DrawString and determine the
> dimensions (height and width) what what was just drawn. Does anyone
> know a way to determine this?
>
> Thanks,
> Rob


Hi Rob,

s = string, f = font and g = graphics

g.MeasureString(s,f).Width
g.MeasureString(s,f).Height

Benjamin

 
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
Bug in Graphics.DrawString ? Alexander Smirnov Microsoft Dot NET Framework 4 17th Sep 2007 07:12 AM
Graphics.DrawString Dom Microsoft C# .NET 1 18th Aug 2007 01:33 AM
graphics.drawstring billsahiker@yahoo.com Microsoft VB .NET 4 3rd Mar 2007 06:09 PM
Help with e.Graphics.DrawString DazedAndConfused Microsoft VB .NET 2 3rd Aug 2005 08:36 PM
Re: Graphics.DrawString Paul G. Tobey [eMVP] Microsoft Dot NET Compact Framework 2 1st Aug 2003 01:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:57 AM.