I have an application whose function is to display a login page on a form load. Once the user logs in to the site, he can close the window. Later on some specified events, the application will pop up URLs from this site using the IE session from the login activity.

To achieve this, I am launching a parent IE window and making it invisible. I am also launching a child window with the same URL which is visible. The agent will login to the website using this child window. The session is created here. Since the parent window is active, even if this child window is closed, the session will still be active.

I have tested this feature on few machines and this works. Only the child window is visible. But on some other machines, both the parent and the child window becomes visible. This is the real problem and I am not sure why this happens. Below is the code snippet I use. Also my OS is Windows XP with IE7.

//Launch Parent window with visible property false

object oObj = null;

SHDocVw.InternetExplorer m_IExplorer = new SHDocVw.InternetExplorerClass();

m_IExplorer.Navigate(sLoginUrl, ref oObj, ref oObj, ref oObj, ref oObj);

m_IExplorer.Visible = false;



//Launch a child window. No need to set the visible property since the child window by default opens in Visible mode.

object oChildWindowFlag = 0x1;

m_IExplorer.Navigate(sLoginUrl, ref oChildWindowFlag, ref oObj, ref oObj, ref oObj);



Any help on this is appreciated!

Thank You,

-Bhaskar