请各位帮忙看一看, 为什么这个功能在win 98 下能实现,在win2000下却不能?

pobosskey 2002-01-27 07:18:56
我做了一个菜单,其中有个内容是访问公司的主页
我是这样做的:


选择菜单Declare->Global External Functions 然后输入:

FUNCTION ulong ShellExecute(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"

在对应的菜单的click()事件中这么写
string lpOperation,lpFile,lpParameters,lpDirectory
setnull(lpOperation)
setnull(lpParameters)
setnull(lpDirectory)
lpFile="http://www.sina.com.cn" //要连接的地址
ShellExecute(handle(this),lpOperation,lpFile,lpParameters,lpDirectory,0)

请问有人知道为什么在win98下能实现功能, 在win2000下就没有任何的反应了?
...全文
71 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
coolnan 2002-03-06
  • 打赏
  • 举报
回复
因为操作系统的不同,它们的DLL文件肯定是有区别的,因此大多的软件都有版本说明,如FOR98呀,FOR2000呀,等等的。这是在2000中的代码,98下也应该能用吧。
FUNCTION ulong ShellExecute(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"

String ls1,ls2,ls3,ls4
ls1 = "open"
ls2 = "http://www.sina.com.cn"
SetNull(ls3)
SetNull(ls4)
ShellExecute(Handle(this),ls1,ls2,ls3,ls4,0)
pobosskey 2002-01-29
  • 打赏
  • 举报
回复
for : SOFTFUN_CSDN(SOFTFUN)
直接 在菜单的click()事件中这么写就可以了吗? 
Methodor 2002-01-27
  • 打赏
  • 举报
回复
改用winexec即可~~
其实这个功能用inet实现更方便~~
inet linet
linet=create inet
GetContextService("Internet", linet)
linet.HyperlinkToURL("http://www....")
destroy linet
~~
tiantianpb 2002-01-27
  • 打赏
  • 举报
回复
看看在winnt下
FUNCTION ulong ShellExecute(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"能不能运行?
定义为ShellExecuteA试试

programbcb 2002-01-27
  • 打赏
  • 举报
回复
关注,up~~~~

401

社区成员

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

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