|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Function to measure text lengthI'm trying to create a function that will return the length of a text
string in inches. e.Graphics.MeasureString(mString, mFont) Seems to be what I'm looking for, but I don't know how to pass PaintEventArgs (e). I don't want to use it in a paint event, I just want it to return a number when I pass it a string and a font. How do I do this? Never mind. I figured it out.
On Sat, 11 Nov 2006 02:09:51 GMT, Kevin <Kevinp@nospam.cfl.rr.com> wrote: Show quoteHide quote >I'm trying to create a function that will return the length of a text >string in inches. > >e.Graphics.MeasureString(mString, mFont) > >Seems to be what I'm looking for, but I don't know how to pass >PaintEventArgs (e). > >I don't want to use it in a paint event, I just want it to return a >number when I pass it a string and a font. How do I do this? Kevin,
Will you as you have figured it out show what you did, people are searching in this newsgroup, there is quite a few about what you have asked, but now you are blocking them because there is a new item without an answer in that. Thanks in advance, Cor Show quoteHide quote "Kevin" <Kevinp@nospam.cfl.rr.com> schreef in bericht news:q8hal259au78u2bqpqvvee11n6csh4k1dr@4ax.com... > Never mind. I figured it out. > > > > On Sat, 11 Nov 2006 02:09:51 GMT, Kevin <Kevinp@nospam.cfl.rr.com> > wrote: > >>I'm trying to create a function that will return the length of a text >>string in inches. >> >>e.Graphics.MeasureString(mString, mFont) >> >>Seems to be what I'm looking for, but I don't know how to pass >>PaintEventArgs (e). >> >>I don't want to use it in a paint event, I just want it to return a >>number when I pass it a string and a font. How do I do this?
Location for shared Access database
Make copy of arraylist newbie: is this the appropriate use of a class? Getting the current procedure name? String manipulation question How to properly "name" a class library? Printign data over form VB.Net XML Comments and Intellisense for COM? AUTOMATIC FONTS Newbie: Textbox text from string |
|||||||||||||||||||||||