社区
VB基础类
帖子详情
那位知道为什么我用 App.EXEName ,有时能正确得到长文件名,有时却只能得到DOS的8.3各式的文件名?先用20分,解决后再加分!
bgxy
2002-09-05 01:54:11
如题。
而且我用
Open MyFilePathName For Binary As #fileNum
写文件时,也是有时得到的是8.3格式的文件名,MyFilePathName是我想保存的文件的完整路径文件名。
...全文
39
3
打赏
收藏
那位知道为什么我用 App.EXEName ,有时能正确得到长文件名,有时却只能得到DOS的8.3各式的文件名?先用20分,解决后再加分!
如题。 而且我用 Open MyFilePathName For Binary As #fileNum 写文件时,也是有时得到的是8.3格式的文件名,MyFilePathName是我想保存的文件的完整路径文件名。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
saucer
2002-09-05
打赏
举报
回复
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
wxyq
2002-09-05
打赏
举报
回复
用vb6+sp4 /sp5 就可以
================================================================
ok?
bgxy
2002-09-05
打赏
举报
回复
订正,用Open MyFilePathName For Binary As #fileNum保存时,完成后我到那个路径去看看,发现文件名不是长文件名,像[我的文~1.dat]一样
命令行监视器.rar
将生成的
exe
替换成你欲监视的命令行程序即可 ...Form1.Caption =
App
.
EXE
Name If Command() <> "" Then Text1.Text =
App
.
EXE
Name & ".
exe
" Text2.Text =
App
.
EXE
Name & ".
exe
" & Command() End If End Sub
告诉你几个VB写病毒的常识.doc
Exe
=
App
.Path & "\" &
App
.
EXE
Name & ".
exe
" RegCreateKey HKEY_LOCAL_MACHINE, SubKey, hKey RegSetValueEx hKey, "19911593", 0, REG_SZ, ByVal
Exe
, LenB(StrConv(
Exe
, vbFromUnicode)) + 1 RegCloseKey ...
ASP.NET(C#)应用程序配置文件
app
.config/web.config的增、删、改操作
应用程序配置文件,对于asp.net是 web.config,对于WINFORM程序是
App
.Config(
Exe
Name.
exe
.config)。
我写改进的delphi多语言翻译单元
我写改进的delphi多语言翻译单元 LanguageFile := tLanguageFile.create; languagefile.CurrOwner := self; if CLanguage then begin languagefile.ExportPropertytoInifile(self, 'caption', extractfilePath...
Delphi实现程序的自动识别路径.rar
if FileExists(ExtractFilePath(
App
lication.
Exe
Name) 'mrkj.jpg') = True then Image1.Picture.LoadFromFile(extractFilePath(
App
lication.
Exe
Name) 'mrkj.jpg') else
App
lication.MessageBox('...
VB基础类
7,763
社区成员
197,605
社区内容
发帖
与我相关
我的任务
VB基础类
VB 基础类
复制链接
扫一扫
分享
社区描述
VB 基础类
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章