G
Guest
Any ideas on how to get the width of a string in pixels?
Thanks,
Randy
Thanks,
Randy
Nicholas Paldino said:Randy,
If you have a Graphics instance for where you are going to render the
string to, you can call the MeasureString method on the Graphics instance,
passing the string and getting the size of the rendered text (in the
specified font) in return.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
randy1200 said:Any ideas on how to get the width of a string in pixels?
Thanks,
Randy
How do you get a Graphics instance of (say) a printer before you start
printing ?