api:GetTextExtentPoint32
BOOL GetTextExtentPoint32(
HDC hdc, // handle to device context
LPCTSTR lpString, // pointer to text string
int cbString, // number of characters in string
LPSIZE lpSize // pointer to structure for string size
);
FROM A VC LEARNER
Public Function lena(a As String) As Long
Dim I As Long
Dim j As Long
j = 0
For I = 1 To Len(a)
If Asc(Mid(a, I, 1)) < 0 Then j = j + 1
Next I
lena = I + j - 1
End Function