例如把
text1.text里的内容 C:\Program Files\Common Files\System 这个文件路径用VB转换为 C:\Progra~1\Common~1\System ,(Dos批处理只支持 8个字符的文件名字)然后返回给text2.text谢谢~急用!有没简洁点的方法~
text1.text里的内容 C:\Program Files\Common Files\System 这个文件路径用VB转换为 C:\Progra~1\Common~1\System ,(Dos批处理只支持 8个字符的文件名字)然后返回给text2.text谢谢~急用!有没简洁点的方法~
Dim lngRes As Long, strPath As String
strPath = String(256, 0)
lngRes = GetShortPathName(strFileName, strPath, 255)
GetShortPath = Left(strPath, lngRes)
End FunctionPrivate Sub Form_Load()
MsgBox GetShortPath("C:\Program Files\Common Files\System")
End
End Sub