首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

Call GetCurrentDirectoryA(256, curdir),该怎么解决

2012-02-29 
Call GetCurrentDirectoryA(256, curdir)Dima,sAsStringDimcurdirAsStringcurdirSpace(256)CallGetCurren

Call GetCurrentDirectoryA(256, curdir)
Dim   a,   s   As   String  
Dim   curdir   As   String  
curdir   =   Space(256)  
Call   GetCurrentDirectoryA(256,   curdir)  
a   =   curdir  
s   =   "\d.bmp "
a   =   a   &   s  
Text1.Text   =   a  
我想的是a= "f:\123\d.bmp "  
可是a   =   "f:\123 "  
错在哪里了.


[解决办法]
Dim a, s As String
Dim curdir As String
dim length as long
curdir = Space(256)
length= GetCurrentDirectoryA(256, curdir)
a = left(curdir ,length-1)
s = "\d.bmp "
a = a & s
Text1.Text = a

热点排行