- 1 Module, 1 Form, 1 Label, dan 1 Textbox.
- Set properti MultiLine pada textbox menjadi True.
------------------------------------------------------------------------
- Pada Module
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
------------------------------------------------------------------------
- Pada Form
Private Sub Text1_Change()
Dim lineCount As Long
On Local Error Resume Next
lineCount = SendMessageLong(Text1.hwnd, EM_GETLINECOUNT, 0&, 0&)
Label1 = Format$(lineCount, "##,###")
End Sub
Senin, 11 Agustus 2008
Menghitung Jumlah Baris diTextbox
Langganan:
Posting Komentar (Atom)

Tidak ada komentar:
Posting Komentar