S
sean_n
The following code below loops through all InternetExplorer objects
and sets the TitleBar to 0--thus hiding all the toolbars. What I
really want is to hide the toolbar only if the text in the titlebar is
set to something. Given InternetExplorer object, how do you get it's
text in the titlebar?
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using SHDocVw;
using Shell32;
namespace hidetoolbar
{
class Program
{
//These are class data members
static private SHDocVw.InternetExplorer m_IExplorer = null;
static private IWebBrowserApp m_WebBrowser = null;
public static void Main(string[] args)
{
ShellClass shell = new Shell32.ShellClass();
ShellWindows ies = (ShellWindows)shell.Windows(); //IE
windows.
InternetExplorer ie;
for (int i = 0; i < ies.Count; i++)
{
ie = (InternetExplorer) ies.Item(i);
//
// Need to find a way to check the Titlebar text
//
ie.ToolBar = 0;
}
}
}
}
and sets the TitleBar to 0--thus hiding all the toolbars. What I
really want is to hide the toolbar only if the text in the titlebar is
set to something. Given InternetExplorer object, how do you get it's
text in the titlebar?
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using SHDocVw;
using Shell32;
namespace hidetoolbar
{
class Program
{
//These are class data members
static private SHDocVw.InternetExplorer m_IExplorer = null;
static private IWebBrowserApp m_WebBrowser = null;
public static void Main(string[] args)
{
ShellClass shell = new Shell32.ShellClass();
ShellWindows ies = (ShellWindows)shell.Windows(); //IE
windows.
InternetExplorer ie;
for (int i = 0; i < ies.Count; i++)
{
ie = (InternetExplorer) ies.Item(i);
//
// Need to find a way to check the Titlebar text
//
ie.ToolBar = 0;
}
}
}
}