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

在PB中定位到一个文件夹,不快用explorer

2013-01-04 
在PB中定位到一个文件夹,不适用explorer如题!就像是从我的电脑,进入F盘,再双击打开Downloads文件夹那样,直

在PB中定位到一个文件夹,不适用explorer
如题!
就像是从我的电脑,进入F盘,再双击打开Downloads文件夹那样,直接定位到Downloads

[解决办法]
FUNCTION Long ShellExecute(Long hwnd, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Long nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA" 

Constant Long SW_SHOWNORMAL = 1

//资源管理器 - 根目录, 指定驱动器树形浏览视图
ls_Topic = "Open"
ls_File = "explorer.exe"
ls_Params = "F:\download"
SetNull(ls_Directory)

ShellExecute(0, ls_Topic, ls_File, ls_Params, ls_Directory, SW_SHOWNORMAL)
[解决办法]

引用:
FUNCTION Long ShellExecute(Long hwnd, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Long nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA" 

Constant Long SW_SH……


直接
string str_null
setnull(str_null)
string ls_path = "F:\download"
ShellExecute(0, str_null, ls_path, str_null, str_null, 1)

即可

热点排行
Bad Request.