本文介绍了如何在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.

推荐答案


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

10-19 20:40