VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Count the number of lines in a text box.

by Syed Danish Afzal Rizvi (13 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 20th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Count the number of lines in a text box.

API Declarations


Const EM_GETLINECOUNT = &HBA




Rate Count the number of lines in a text box.



Dim cntln As Long
   On Error Resume Next
    cntln = SendMessageLong(Text1.hwnd, EM_GETLINECOUNT, 0&, 0&) 'Counting Lines
    Label1.Caption = Format$(cntln , "##,###") 'Formating Label Control
End Sub


Download this snippet    Add to My Saved Code

Count the number of lines in a text box. Comments

No comments have been posted about Count the number of lines in a text box.. Why not be the first to post a comment about Count the number of lines in a text box..

Post your comment

Subject:
Message:
0/1000 characters