在WPF Web浏览器应用程序中隐藏IE Internet Explorer的工具栏 [英] Hiding toolbar of IE Internet Explorer in wpf web browser Application
本文介绍了在WPF Web浏览器应用程序中隐藏IE Internet Explorer的工具栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行WPF浏览器应用程序时,我想在Internet Explorer中隐藏工具栏和地址栏...
I want to hide the toolbar and address bar in Internet Explorer when running the WPF browser application...
推荐答案
尝试一下此操作
Try this
using SHDocVw; //Interop.SHDocVw.dll
using Shell32; //Interop.Shell32.dll
namespace CSBrowserHelperObject
{
class Program
{
static private SHDocVw.InternetExplorer m_IExplorer = null;
static private IWebBrowserApp m_WebBrowser = null;
public static void Main(string[] args)
{
Shell shell = new Shell32.Shell();
ShellWindows ies = (ShellWindows)shell.Windows();
InternetExplorer ie;
for (int i = 0; i < ies.Count; i++)
{
ie = (InternetExplorer)ies.Item(i);
ie.ToolBar = 0;
}
}
}
}
这篇关于在WPF Web浏览器应用程序中隐藏IE Internet Explorer的工具栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文