以二进制方式读取
This example opens the file in Binary mode for writing operations only.Open "TESTFILE" For Binary Access Write As #1
' Close before reopening in another mode.
Close #1
'pif快捷方式的第430字节为8,全屏幕运行
    Open TOUCHPATH & "\touch.pif" For Binary As #FileNumber
    Put #FileNumber, 430, 8
    Close #FileNumber 读取用
Get #filenumber, 430, I

解决方案 »

  1.   

    转换用ascw如果读出的值不对(如显示?)
    则当作2进值文件读入
      

  2.   

    open "..." for binary as #filenumber
    redim arrayofbytes(1 to lof(filenumber)) as byte
    get #filenumber, 1, arrayofbytes这样,这个文件全部都在arraybytes这个byte array中了
    您要获取哪一位就很简单了
      

  3.   

    用Chr可以把字符转换为字符代码!
     
    Asc 函数
          返回一个 Integer,代表字符串中首字母的字符代码。语法Asc(string)必要的 string 参数可以是任何有效的字符串表达式。如果 string 中没有包含任何字符,则会产生运行时错误。说明在非 DBCS 系统下,返回值范围为 0 – 255 。在 DBCS 系统下,则为 -32768 – 32767。注意    AscB 函数作用于包含在字符串中的字节数据,AscB 返回第一个字节的字符代码,而非字符的字符代码。AscW 函数返回 Unicode 字符代码,若平台不支持 Unicode,则与 Asc 函数功能相同。