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

绝版灬思念 2011-04-16 04:10:46
如题!
就像是从我的电脑,进入F盘,再双击打开Downloads文件夹那样,直接定位到Downloads
...全文
1342 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hc_hchc 2013-02-21
  • 打赏
  • 举报
回复
ok very good
绝版灬思念 2011-04-19
  • 打赏
  • 举报
回复
谢谢两位,
4楼说的非常简单易用,谢谢
不过3楼的给的非常详细,各项功能都容易看明白,虽然对我来说看明白跟没看明白的区别不大……
给分真的是个纠结的过程……

ShellExecuteA(Handle(Parent), ls_null, s_folder, ls_null, ls_null, 1)
yyoinge 2011-04-18
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 lamar511 的回复:]
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……
[/Quote]

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

即可
LamarChen 2011-04-16
  • 打赏
  • 举报
回复
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)
绝版灬思念 2011-04-16
  • 打赏
  • 举报
回复
帮我解决一下啊。。。至少来个人啊
绝版灬思念 2011-04-16
  • 打赏
  • 举报
回复
不使用! run('explorer '+folder) 这样的

680

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder API 调用
社区管理员
  • API 调用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧