Get a substring of a long string which fits in a width

Posted by Lu Lu on Stack Overflow See other posts from Stack Overflow or by Lu Lu
Published on 2010-04-19T03:00:10Z Indexed on 2010/04/19 3:03 UTC
Read the original article Hit count: 367

Filed under:
|

Hello everyone, I have a long string, ex: "Please help me to solve this problem." This string is so long to fit in a width of 100 pixels. I need to get a substring of this string and substring will fit in 100 pixels. Ex: substring "Please help me to sol" is fit in 100 pixels.

Please help me how to estimate a substring like this. Thanks.

My application is Win Forms and C#.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET