订正,用Open MyFilePathName For Binary As #fileNum保存时,完成后我到那个路径去看看,发现文件名不是长文件名,像[我的文~1.dat]一样

解决方案 »

  1.   

    用vb6+sp4 /sp5 就可以
    ================================================================ok?
      

  2.   

    you can always convert it into long file name using a function like
    (from http://216.26.168.92/tips/tip511.html)Public Function GetLongFileName(ByVal ShortFileName As String) As String    Dim intPos As Integer
        Dim strLongFileName As String
        Dim strDirName As String
        
        'Format the filename for later processing
        ShortFileName = ShortFileName & "\"
        
        'Grab the position of the first real slash
        intPos = InStr(4, ShortFileName, "\")
        
        'Loop round all the directories and files
        'in ShortFileName, grabbing the full names
        'of everything within it.
        
        While intPos
        
            strDirName = Dir(Left(ShortFileName, intPos - 1), _
                vbNormal + vbHidden + vbSystem + vbDirectory)
            
            If strDirName = "" Then
                GetLongFileName = ""
                Exit Function
            End If
            
            strLongFileName = strLongFileName & "\" & strDirName
            intPos = InStr(intPos + 1, ShortFileName, "\")
            
        Wend    'Return the completed long file name
        GetLongFileName = Left(ShortFileName, 2) & strLongFileName
      
    End Function