上一篇 | 下一篇

取得File 8.3之文件名称格式

发布: 2008-6-26 09:30 | 作者: admin | 来源: | 查看: 1次

Private Declare Function GetShortPathName Lib "kernel32" Alias

"GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As

String, ByVal cchBuffer As Long) As Long

Private Declare Function GetFullPathName Lib "kernel32" _

Alias "GetFullPathNameA" (ByVal lpFileName As String, _

ByVal nBufferLength As Long, ByVal lpBuffer As String, _

lpFilePart As Byte) As Long

Private Sub Command1_Click()

Dim aa As Long, pbase As Long

Dim FullPath As String, ShortPath As String

Dim SouStr As String

Dim len5 As Long

Dim fname() As Byte

Dim gg As String

SouStr = "C:vb5.exe"

ShortPath = String(255, 0)

aa = GetShortPathName(SouStr, ShortPath, 256)

SouStr = Left(ShortPath, InStr(1, ShortPath, Chr(0)) - 1)

Debug.Print SouStr

End Sub

字号: | 推荐给好友

评分:0

我来说两句

网络推荐