Click here to Skip to main content
16,022,418 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to open an IE window from my code using the following:

C#
private void Form1_Load(object sender, EventArgs e)
{
       object sObj = null;
       m_IExplorer = new SHDocVw.InternetExplorer();
                   
       object sUrl = "www.google.com";
       m_IExplorer.Navigate((string)sUrl, ref sObj, ref sObj, ref sObj, ref sObj);       
}


and then in a button click I am opening a new window like this:

C#
private void button1_Click(object sender, EventArgs e)
{
 object flag = 0x1;
 object sObj = null;
 object sUrl = "http://www.yahoo.com";
 m_IExplorer.MenuBar = false;
 m_IExplorer.Navigate((string)sUrl, ref flag, ref sObj, ref sObj, ref sObj); 
}


I am trying to open child window on the button click and this window has to open without a Menu Bar. But the line:

m_IExplorer.MenuBar = false;

doesn't seems to have any effect. The child window opens up with the Menu Bar.

Can anyone help me with this?

Thanks for your help,
-Bhaskar.
Posted
Updated 18-Aug-11 21:08pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900