Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


show amount of lines in a multi line textbox
 

 

Description

show amount of lines in a multi line textbox

Author

Anon

Code

Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Public Const EM_GETLINECOUNT = &HBA

Dim lngLineCount As Long
On Error Resume Next

'get/show the number of lines in the edit control
lngLineCount = SendMessageLong(Text1.hwnd, EM_GETLINE, 0&, 0&)
Label1 = Format$(lngLineCount, "##,###")

Information

tested using VB 6 , Windows 98 , 2000 , XP

 

 

 

 

Download

amountlines.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Neon text(Javascript)
set background colour(CSS)
vertical scrolling text(Darkbasic)
number of entries in a log file(VBScript)
activate the windows screensaver(Visual Basic)
Create a folder(ASP)
text box scroller(Javascript)
format a number(php)

    




Copyright © 2003 by programmershelp.co.uk