vb6.0判断txt文件的末尾是不是回车换行符

用VB6.0如何判断txt文本文件的末尾是不是一个回车换行符?如这两个图片所示,光标位于文本末尾,如何区分这两种情况?EOF(n)方法无法进行区分。求解决方法,谢谢~

function test(byval file) as boolean
        dim fso as object
        set fso=createobject("scripting.filesystemobject")
file=file
if fso.fileexists(file) then
if fso.getfile(file).size>0 then
read=fso.opentextfile(file).readall
if right(read,2)=vbcrlf then
test=-1
else
test=0
end if
end if
end if
end function
'调用方法
'if test("1.txt") then
'有回车
'else
'没有回车
'end if

温馨提示:答案为网友推荐,仅供参考
相似回答