各位大侠前辈好:
问题是关于OLE调IE的。望各位大侠前辈能忙中抽闲,帮予解答。
我是做医疗软件的,主要是给医院做HIS系统,用PB开发。现在我要实现 在我的程序里调用一个WEB地址,我已基本实现了初步的调用,但问题是我打开的主界面里还有链接,当我再点击时,就会自动打开一个新的IE,脱离了PB程序。我想请教您一下,怎么能在PB中随意的打开多个IE界面,就像现在的IE8一样,可以有多个TAB页那样。或者可以前进或后退。但只要不跑出PB就可以。
麻烦了。谢谢!
邮箱:[email protected]
QQ:51065568
------解决方案--------------------
//在OLE的点击事件中加入:
string ls_tagName, ls_name,ls_a
ls_tagName=ole_1.object.document.activeElement.tagName
if upper(trim(ls_tagName))="A" then //同理可以对INPUT、图片、表单等响应
ls_name = ole_1.object.document.activeElement.id //这个要看网页源码
ls_a=ole_1.object.Document.activeElement.href //这个ls_a就是点击的链接地址
//然后在这里根据链接的id或者href 判断你要进行什么动作了
end if
------解决方案--------------------
//在OLE的点击事件中加入:
string ls_tagName, ls_name,ls_a
ls_tagName=ole_1.object.document.activeElement.tagName
if upper(trim(ls_tagName))="A" then //同理可以对INPUT、图片、表单等响应
ls_name = ole_1.object.document.activeElement.id //这个要看网页源码
ls_a=ole_1.object.Document.activeElement.href //这个ls_a就是点击的链接地址
//然后在这里根据链接的id或者href 判断你要进行什么动作了。比如:
if ls_a = 'http://www.baidu.com/' then
ole_1.object.navigate2(ls_a)//这样就在OLE中打开百度,而不是新开一个窗口。
end if
end if