如何在Internet Explorer 9中使用VB6隐藏地址栏 [英] how to hide address bar using VB6 in Internet Explorer 9

查看:154
本文介绍了如何在Internet Explorer 9中使用VB6隐藏地址栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好, InternetExplorer.AddressBar = False 与IE 8正常运行。但在IE 9中,这不起作用。地址栏可见。请帮忙。



代码:



Hi All, InternetExplorer.AddressBar = False was working fine with IE 8. But in IE 9, this does not work. Address Bar is visible. Please help.

Code:

Dim sctest As ScriptControl 
Dim scode As String 
scode = " function OnProgramLoad() { window.open(""" & "http://www.google.co.uk/" & """, """ & "mywindow" & """); } " 
If Len(scode) < 1 Then Exit Sub 
If InStr(1, scode, "OnProgramLoad", vbTextCompare) = 0 Then Exit Sub 
Set sctest = New ScriptControl 
With sctest 
    .Language = "JScript" 
    .AllowUI = True 
    .AddObject "Application", App 
    .AddObject "Clipboard", Clipboard 
    .AddObject "Printer", Printer 
    .AddObject "Screen", Screen 
    .AddCode scode 
    .Run "OnProgramLoad" 'Error is thrown here
End With 
Set sctest = Nothing







已添加从我的解决方案下面的评论中获取OP的源代码。




Added source code to OP from comments below my solution.

推荐答案

在IE的更高版本中删除了隐藏地址栏的功能。

但是,有一种解决方法:



您需要使用JavaScript来隐藏地址栏,因为无法使用VB 6,ASP.Net等隐藏它:

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml [ ^ ]



欢呼,

Marco
The feature of hiding the adress bar was removed in later versions of IE.
However, there is a workaround:

You need to use JavaScript to hide the adress bar, since it is not possible to hide it with VB 6, ASP.Net etc.:
http://www.javascript-coder.com/window-popup/javascript-window-open.phtml[^]

cheers,
Marco


这篇关于如何在Internet Explorer 9中使用VB6隐藏地址栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆