Bob
Bob

Reputation: 1061

Open InternetExplorer From C# with new context

var ie = new InternetExplorer { Visible = true };
ie.Navigate("http://google.com");
ie.DocumentComplete += IeDocumentComplete;

But when the document is opened, it's like a Ctrl+N in Internet Explorer. I don't want to keep context and session. I would like a new instance of Internet explorer.

Can you help me please ?

Many Thanks

Upvotes: 1

Views: 1155

Answers (2)

Craig T
Craig T

Reputation: 1071

Based on your example code, I'm guessing your using the InternetExplorer class from ShDocVw.dll?

Instead of using that, try to open Internet Explorer by launching it as a new process...

System.Diagnostics.Process.Start("iexplore.exe http://www.google.com");

That may do it, but it may also be down to specific user settings in the browser itself.

Upvotes: 0

RaM
RaM

Reputation: 1107

I think you need to capture the key board event and pass it to the InternetExpolorer control, if I am not wrong because the key interrupts are sent to your application (and not to your IE Control) it does not work.

http://msdn.microsoft.com/en-us/library/aa768335(VS.85).aspx

Hope that helps!!!

Upvotes: 1

Related Questions