Private Sub Command1_Click()
Dim arrBytes() As Byte
Open "c:\aaa.txt" For Binary As 1
ReDim arrBytes(1 To LOF(1))
Get 1, , arrBytes
Close 1
MsgBox UBound(Split(StrConv(arrBytes, vbUnicode), vbCrLf))
Erase arrBytes
End Sub
文件读到Text中
Option Explicit
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const EM_GETLINE = &HC4
Public Const EM_GETLINECOUNT = &HBA
Public Const EM_GETFIRSTVISIBLELINE = &HCE