如何用代码访问网址

sxuhai 2003-12-12 09:58:08
如想通过代码直接打开www.sina.com.cn,应该如何写?
...全文
82 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiongxiao 2003-12-12
  • 打赏
  • 举报
回复
先声明:
FUNCTION ulong ShellExecutea(ulong hwnd,ref string lpOperation,ref string lpFile,ref string lpParameters,ref string lpDirectory,ulong nShowCmd) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"


string httppath = "http://www.csdn.net/"
string ls_null
ulong ll_null
string op = "open"
string http = "http://www.sina.com.cn/"
constant ulong SW_SHOW = 1
setnull(ls_null)
setnull(ll_null)
ShellExecuteA(ll_null,op,httppath,ls_null,ls_null,SW_SHOW)
lmby 2003-12-12
  • 打赏
  • 举报
回复
string ls_ie, ls_link, ls_url

registryget( 'HKEY_CLASSES_ROOT\Applications\iexplore.exe\shell\open\command', '', regstring!, ls_ie )

ls_ie = left( ls_ie, len( ls_ie ) - 2 )

ls_url = 'www.sina.com.cn'

run( ls_ie + ls_url )
jlwei888 2003-12-12
  • 打赏
  • 举报
回复
可直接用statichyperlink 、picturehyperlink 控件,
也可以用run函数

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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