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

关于SetCurrentDirectoryA的使用有关问题

2012-02-07 
关于SetCurrentDirectoryA的使用问题我在程序中定义了FunctionulongSetCurrentDirectoryA(stringdirtext)l

关于SetCurrentDirectoryA的使用问题
我在程序中定义了Function ulong SetCurrentDirectoryA(string dirtext) library "KERNEL32.DLL"
SetCurrentDirectoryA("c:\"),用getfilesavename后发现打开的默认目录还是程序目录,这是为什么啊?我的pb版本是6.5

[解决办法]
定义:
Function ulong SetCurrentDirectory(ref string lpPathName) LIBRARY "kernel32.dll" ALIAS FOR "SetCurrentDirectoryA"

使用:
string ls_path

ls_path = 'c:\'
SetCurrentDirectory(ls_path)

[解决办法]
定义: 
Function ulong SetCurrentDirectory(ref string lpPathName) LIBRARY "kernel32.dll" ALIAS FOR "SetCurrentDirectoryA" 
再试试
[解决办法]
这有什么用啊!
还用6.5老古董!
用绝对路径呢!

热点排行