Re: Warp a String
- From: "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <microbrain@xxxxxxxx>
- Date: Fri, 28 Apr 2006 16:33:18 +0530
Hi Rick,
I thanks for your reply. But I want No. of Lines & Text of Particular Line.
In your example the No. of Lines is also not coming properly because you had
used MOD operator to increase line.
If you know the FoldSting WinAPI then please reply me it's usage.
Sanjay Shah
Rick Rothstein <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message
news:ucxnBnpaGHA.5088@xxxxxxxxxxxxxxxxxxxxxxx
I am having a string contain Item description may have length upto 64KB
character including VbCrLf.
1. How to find No. of Lines in String if warp at 41 character or VbCrLf
which is earlier.
Off the top of my head, I think this function should return the proper
number:
Function LineCount(TextIn As String, _
Optional LineLength As Long = 41) As Long
Dim X As Long
Dim Lines() As String
Lines = Split(YourText, vbCrLf)
LineCount = UBound(Lines) + 1
For X = 0 To UBound(Lines)
LineCount = LineCount + (Len(Lines(X)) - 1) Mod LineLength
Next
End Function
Rick
.
- Follow-Ups:
- Re: Warp a String
- From: Mike D Sutton
- Re: Warp a String
- References:
- Re: Warp a String
- From: Rick Rothstein
- Re: Warp a String
- Prev by Date: Re: Warp a String
- Next by Date: Re: Grab MDI Background Color
- Previous by thread: Re: Warp a String
- Next by thread: Re: Warp a String
- Index(es):
Relevant Pages
|