Re: WebBrowser control error
- From: "Charles Law" <blank@xxxxxxxxxxx>
- Date: Fri, 1 Jul 2005 00:19:00 +0100
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:urY7LNafFHA.3612@xxxxxxxxxxxxxxxxxxxxxxx
> 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" <blank@xxxxxxxxxxx> wrote in message
> news:%23Vh$OrUfFHA.2484@xxxxxxxxxxxxxxxxxxxxxxx
>> 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_ctl
>> microsoft.public.inetsdk.programming.mshtml_hosting
>>
>> although there is less VB.NET specific knowledge there.
>>
>> HTH
>>
>> Charles
>>
>>
>> "Shane Story" <nospam@xxxxxxxxxxxx> wrote in message
>> news:%2320p25QfFHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
>> >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
>> >
>> >
>> >
>>
>>
>
>
.
- Follow-Ups:
- Re: WebBrowser control error
- From: Shane Story
- Re: WebBrowser control error
- Prev by Date: Re: INI or XML
- Next by Date: Re: Converting BitMap to Icon
- Previous by thread: Re: INI or XML
- Next by thread: Re: WebBrowser control error
- Index(es):
Relevant Pages
|