[bo][un]lyk997[/un] 在 2008-11-8 13:43 的发言:[/bo]
请问下 三断笛 版主,方法三怎么调用?
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_GETLINECOUNT = &HBA
Public Function GetTextLines(txtHwnd As Long) As Long
GetTextLines = SendMessage(txtHwnd, EM_GETLINECOUNT, 0, 0)
End Function
[bo]Private Sub Command1_Click()
MsgBox GetTextLines(Text1.hwnd)
End Sub[/bo]