473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

WebBrowser control error

I am trying to add the Microsoft Web Browseractive X control to a vb.net
form.

I always get an error on the EndInit line.

Parts of the errors says:

"Unknown error"

"First Chance exception"

I tried putting it in a user control but this failed also.

Anyone have a solution?

Or is there another control that is free that could be used in place of it?

I need a solution now and not a VS 2005 solution.

Thanks,

Shane

Nov 21 '05 #1
6 4819
Shane,

Did you do it like this. Don't ask yourself why I show it like this, because
I have seen people with great expirience failing in this because of the
documentation which is not always very clear in this part.

\\\
In the toolbox rightclick and select add/Remove items

In the customize toolbox select Com and in that Microsoft Webbrowser

When that is in the toolbox drag it to your form
///
The point is that it creates doing this code in the RESX.
I hope this helps,

Cor
Nov 21 '05 #2
Hi Shane

I fear you will have to live with this if you use the WebBrowser control. If
you don't catch first chance exceptions the code will proceed and the
control should work correctly. Watch out for MarshalDirectiveException:
"Marshaler restriction: Excessively long string" exceptions as well. These
will pop up all over the place, but can usually be ignored.

Unfortunately the WebBrowser control is pretty flaky when used in .NET. That
is not to say that it doesn't work (or can't be made to work), but you will
have to ignore these particular exceptions, and if you want to do anything
sophisticated you will have to scour the newsgroups for information, or ask
here, of course.

The way I tackled it was to wrap the WebBrowser control in a user control,
and then I could protect the rest of my program from these wild exceptions.
You are effectively creating your own, well-behaved browser control.

You may like to look here as well

microsoft.public.inetsdk.programming.webbrowser_ct l
microsoft.public.inetsdk.programming.mshtml_hostin g

although there is less VB.NET specific knowledge there.

HTH

Charles
"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I am trying to add the Microsoft Web Browseractive X control to a vb.net
form.

I always get an error on the EndInit line.

Parts of the errors says:

"Unknown error"

"First Chance exception"

I tried putting it in a user control but this failed also.

Anyone have a solution?

Or is there another control that is free that could be used in place of
it?

I need a solution now and not a VS 2005 solution.

Thanks,

Shane

Nov 21 '05 #3
Charles,

The one I was talking about was not you, (that you understand of course),
however somebody who was helping you. He was busy with using it as IE.

:-)

Cor
Nov 21 '05 #4
What alternative is there? Is there another control that would do a simple
web page rendering?

My problem is in the InitalizeComponent where it does the EndInit for
webbrowser. I can't seem to trap that error. It happen even if a try catch
is around that line of code.

Any ideas? Links? Controls? Code?

Thanks,

Shane
"Charles Law" <bl***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi Shane

I fear you will have to live with this if you use the WebBrowser control. If you don't catch first chance exceptions the code will proceed and the
control should work correctly. Watch out for MarshalDirectiveException:
"Marshaler restriction: Excessively long string" exceptions as well. These
will pop up all over the place, but can usually be ignored.

Unfortunately the WebBrowser control is pretty flaky when used in .NET. That is not to say that it doesn't work (or can't be made to work), but you will have to ignore these particular exceptions, and if you want to do anything
sophisticated you will have to scour the newsgroups for information, or ask here, of course.

The way I tackled it was to wrap the WebBrowser control in a user control,
and then I could protect the rest of my program from these wild exceptions. You are effectively creating your own, well-behaved browser control.

You may like to look here as well

microsoft.public.inetsdk.programming.webbrowser_ct l
microsoft.public.inetsdk.programming.mshtml_hostin g

although there is less VB.NET specific knowledge there.

HTH

Charles
"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I am trying to add the Microsoft Web Browseractive X control to a vb.net
form.

I always get an error on the EndInit line.

Parts of the errors says:

"Unknown error"

"First Chance exception"

I tried putting it in a user control but this failed also.

Anyone have a solution?

Or is there another control that is free that could be used in place of
it?

I need a solution now and not a VS 2005 solution.

Thanks,

Shane


Nov 21 '05 #5
Doing a quick Google brought up

http://www.itwriting.com/htmleditor/index.php
http://www.thinktechnologies.com/think_html.asp

I'm not sure why you cannot get past the first chance exception. If you
don't try to trap it, and don't have exceptions break into the debugger (in
the IDE) then the exception should just be ignored. I certainly wouldn't put
a Try ... Catch around the code, because it is in the InitializeComponent
sub, and that will get overwritten by the designer. Go to Debug |
Exceptions, and check that Common Language Runtime Exceptions are set to
Continue "When the exception is thrown". In these conditions, my Windows
form loads without reporting an exception.

HTH

Charles
"Shane Story" <sstoryREMOVETHIS at lburgus dot com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
What alternative is there? Is there another control that would do a simple
web page rendering?

My problem is in the InitalizeComponent where it does the EndInit for
webbrowser. I can't seem to trap that error. It happen even if a try
catch
is around that line of code.

Any ideas? Links? Controls? Code?

Thanks,

Shane
"Charles Law" <bl***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi Shane

I fear you will have to live with this if you use the WebBrowser control.

If
you don't catch first chance exceptions the code will proceed and the
control should work correctly. Watch out for MarshalDirectiveException:
"Marshaler restriction: Excessively long string" exceptions as well.
These
will pop up all over the place, but can usually be ignored.

Unfortunately the WebBrowser control is pretty flaky when used in .NET.

That
is not to say that it doesn't work (or can't be made to work), but you

will
have to ignore these particular exceptions, and if you want to do
anything
sophisticated you will have to scour the newsgroups for information, or

ask
here, of course.

The way I tackled it was to wrap the WebBrowser control in a user
control,
and then I could protect the rest of my program from these wild

exceptions.
You are effectively creating your own, well-behaved browser control.

You may like to look here as well

microsoft.public.inetsdk.programming.webbrowser_ct l
microsoft.public.inetsdk.programming.mshtml_hostin g

although there is less VB.NET specific knowledge there.

HTH

Charles
"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
>I am trying to add the Microsoft Web Browseractive X control to a vb.net
>form.
>
> I always get an error on the EndInit line.
>
> Parts of the errors says:
>
> "Unknown error"
>
> "First Chance exception"
>
> I tried putting it in a user control but this failed also.
>
> Anyone have a solution?
>
> Or is there another control that is free that could be used in place of
> it?
>
> I need a solution now and not a VS 2005 solution.
>
> Thanks,
>
> Shane
>
>
>



Nov 21 '05 #6
Hey,

You are right! Ignoring two com exceptions made it run.
I hope this will cause me no problems at run time.

Thanks for the information!

Shane

"Charles Law" <bl***@nowhere.com> wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl...
Doing a quick Google brought up

http://www.itwriting.com/htmleditor/index.php
http://www.thinktechnologies.com/think_html.asp

I'm not sure why you cannot get past the first chance exception. If you
don't try to trap it, and don't have exceptions break into the debugger
(in the IDE) then the exception should just be ignored. I certainly
wouldn't put a Try ... Catch around the code, because it is in the
InitializeComponent sub, and that will get overwritten by the designer. Go
to Debug | Exceptions, and check that Common Language Runtime Exceptions
are set to Continue "When the exception is thrown". In these conditions,
my Windows form loads without reporting an exception.

HTH

Charles
"Shane Story" <sstoryREMOVETHIS at lburgus dot com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
What alternative is there? Is there another control that would do a
simple
web page rendering?

My problem is in the InitalizeComponent where it does the EndInit for
webbrowser. I can't seem to trap that error. It happen even if a try
catch
is around that line of code.

Any ideas? Links? Controls? Code?

Thanks,

Shane
"Charles Law" <bl***@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi Shane

I fear you will have to live with this if you use the WebBrowser
control.

If
you don't catch first chance exceptions the code will proceed and the
control should work correctly. Watch out for MarshalDirectiveException:
"Marshaler restriction: Excessively long string" exceptions as well.
These
will pop up all over the place, but can usually be ignored.

Unfortunately the WebBrowser control is pretty flaky when used in .NET.

That
is not to say that it doesn't work (or can't be made to work), but you

will
have to ignore these particular exceptions, and if you want to do
anything
sophisticated you will have to scour the newsgroups for information, or

ask
here, of course.

The way I tackled it was to wrap the WebBrowser control in a user
control,
and then I could protect the rest of my program from these wild

exceptions.
You are effectively creating your own, well-behaved browser control.

You may like to look here as well

microsoft.public.inetsdk.programming.webbrowser_ct l
microsoft.public.inetsdk.programming.mshtml_hostin g

although there is less VB.NET specific knowledge there.

HTH

Charles
"Shane Story" <no****@nothanks.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
>I am trying to add the Microsoft Web Browseractive X control to a
>vb.net
>form.
>
> I always get an error on the EndInit line.
>
> Parts of the errors says:
>
> "Unknown error"
>
> "First Chance exception"
>
> I tried putting it in a user control but this failed also.
>
> Anyone have a solution?
>
> Or is there another control that is free that could be used in place
> of
> it?
>
> I need a solution now and not a VS 2005 solution.
>
> Thanks,
>
> Shane
>
>
>



Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Selden McCabe | last post by:
I'm trying to display some HTML on a form in a VB.Net project. I've referenced the COM WebBrowser control, and put an instance of it on my form. But during the Form_Load, I'm getting the...
1
by: L. Chernov | last post by:
Hello, I am trying to work with .Net 2005 WebBrowser object, and put it on a "Windows control library" (embedded in a user control class) and then I am executing it from an ASP.Net webform(with...
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
4
by: dennijr | last post by:
sry its long, questions in the last sentance if u wanna jump to it. i just decided that i would include everything that led up to the problem i made a gif video that i wanted to put...
4
by: David | last post by:
I'm using the AxSHDocVw.WebBrowser control to download data from a webpage at work (it's an internal page on my company's intranet). The page produces a runtime error after a while and the...
6
by: Leon | last post by:
Hi there, I am trying to use the WebBrowser Control in a form which is being started in an own thread by the main form of my application. Unfortunately I am always getting an error in...
3
by: Dom | last post by:
I have a prgram with a webBrowser control. The user can click on a Linked Reference and the webBrowser control shows that site. Sometimes the URL (not my program, but the URL I am browsing to)...
4
by: kimiraikkonen | last post by:
Hi, Just to test, i placed a simple webbrowser to login a site, this site has no problems and has same error with IE6 SP2 but it's suppressed as well and no problem with Firefox browser, but using...
11
by: kimiraikkonen | last post by:
Hi there, I needed to use MouseOver event on Webbrowser which is NOT provided by webbrowser control natively(what a disappointment), so i decided to go with another route to simulate this like: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.