Using axWebBrowser on a form

C

Claire

I'm using C# in Visual Studio 2003, XP pro with latest IE plus all patches
and security updates.

I imported microsofts web browser control onto my tool palette from the COM
tab of "Add/remove toolbox items".
When I drop the web browser onto a form, AxSHDocVw and SHDocVW are
automatically added to my references list.

When I run the application, it breaks on the last line of the following
code snippet with exception
"A first chance exception of type
'System.Runtime.InteropServices.COMException' occurred in
system.windows.forms.dll
Additional information: Unknown error".
If I press Continue, i receive the same error 3-4 times and the program
continues. I can see the browser control on the form after the errors finish
appearing.

private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
foo.........
((System.ComponentModel.ISupportInitialize)(this.uxTimeLabel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit();
this.ResumeLayout(false); <<<<< Breaks here
}

I did a search on www and found a couple of articles where the author
created axshdocvw and shdocvw manually using aximp.exe. But in my case they
seem to have been generated automatically by the fact that their presence
was automatically added to the references list when I dropped the component
off my toolbox onto the form. So I didnt feel those articles were relevant
in my case.

I believe this control is present already in VS 2005, but I don't have that
tool to work with. So is there something else I'm missing here?

thank you
 
C

Claire

Further to this. It's only happening within our application environment, it
works fine in a new "clean" application when dropped on the empty main form
and run.
*sigh* how will I find out what's happening here!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top