473,749 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AxWebbrowser control problem

I am trying to use the AxWebbrowser control in my VB.Net application. The
control is placed on one of the tab pages in the form. This is the error I am
getting when I
have the 'exceptions' set to break into the debugger:
A first chance exception of type
'System.Runtime .InteropService s.COMException' occurred in
system.windows. forms.dll

Additional information: Unknown error

If I set the 'exceptions' to Continue, then the control is not visible in
the form during run-time.

Any help is greatly appreciated.
Thanks.
Nov 28 '05 #1
13 4222
Udhay,

The axwebbrowser is integrated in the resources.

I never succeeded to set it as viewable webbrowser (not as link to internet
explorer) without dragging it from the toolbox.

What did you do?

Cor
Nov 29 '05 #2
Cor,
I guess I did not clearly explain the problem in my last post.

I am creating an user control (myUControl.dll ) in VB .Net 2003 and in that
I have a TabControl with four tab pages. In the third tab page, I placed an
AxWebBrowser control (from the tool box where I added the COM Microsoft Web
Browser shdocvw.dll, initially) and couple of buttons to navigate. The
problem is when I try to use the myUControl.dll in my main application
(myUApp.exe), it always break at this line:
CType(Me.AxWebB rowser1,
System.Componen tModel.ISupport Initialize).End Init()

Please help.
Thanks.
Nov 29 '05 #3
Udhay,

That is exactly the problem that I have when I did not drag it, did you drag
it on your tabpage?

Cor
Nov 29 '05 #4
Cor,

I am not sure what you mean by dragging it on the tab page! This is
what I did:

Within the user control, I was on that tabpage (tabpage3) and from the
tool box I selected the web browser control and placed it on the
tabpage (and expanded the size of the web control).

If there is way that I can send you my stripped down code for you to
look at?

Thanks.
Udhay

Nov 29 '05 #5
Shobauy,

I think that it is not needed to send code.

I have created a new project
Draged on the form a tabcontrol with 4 tabpages
Draged on page for the Axwebbrowser (I assume you are talking about
2002/2003)
I have docked the Axwebbrowswer to fill

than I have put this code in the load event of the page
\\\
Private Sub Form1_Load(ByVa l sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
TabControl1.Sel ectedTab = TabPage4
Me.AxWebBrowser 1.Navigate2("ww w.google.com")
End Sub
///

Now I have a specialized webbrowser in Tab 4 for Google.

Can you try that as well.

I hope this helps,

Cor

<sh*****@gmail. com> schreef in bericht
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
Cor,

I am not sure what you mean by dragging it on the tab page! This is
what I did:

Within the user control, I was on that tabpage (tabpage3) and from the
tool box I selected the web browser control and placed it on the
tabpage (and expanded the size of the web control).

If there is way that I can send you my stripped down code for you to
look at?

Thanks.
Udhay

Nov 29 '05 #6
Hi Udhay

The WebBrowser control does this when used in VB.NET. It is safe to ignore
this exception. Set Exceptions to Continue rather than Break into the
Debugger and it should work.

The WebBrowser control is an ActiveX, and when you drop it into your
application an AxHost wrapper is created to marshal calls between managed
and unmanaged code (that's why it appears as AxWebBrowser). EndInit throws
an "Unknown Error" because there are many bugs (sorry, coding anomalies) in
the wrapped WebBrowser control, but you can ignore this one.

HTH

Charles
"Udhay" <uy@newsgroup.n ospam> wrote in message
news:C8******** *************** ***********@mic rosoft.com...
Cor,
I guess I did not clearly explain the problem in my last post.

I am creating an user control (myUControl.dll ) in VB .Net 2003 and in that
I have a TabControl with four tab pages. In the third tab page, I placed
an
AxWebBrowser control (from the tool box where I added the COM Microsoft
Web
Browser shdocvw.dll, initially) and couple of buttons to navigate. The
problem is when I try to use the myUControl.dll in my main application
(myUApp.exe), it always break at this line:
CType(Me.AxWebB rowser1,
System.Componen tModel.ISupport Initialize).End Init()

Please help.
Thanks.

Nov 30 '05 #7
Charles,

I am not sure if it is this one, however I have in the program where I use
this as well that empty catch, I find it terrible to look at. This one is in
my idea that one that Fergus and you have strugled so long with.

(In my idea is the one you mention in the document complete, however maybe
is that the remedie with this one as well.)

:-)

Cor
Nov 30 '05 #8
Charles,

When I set the CLR Exceptions to 'Continue' and run the application, I
do not even see the browser control on the tab. Once again, this is
happenning only when I have the browser control on a tab within an User
Control; if I do the same thing in a regular windows application
everything works fine! (ofcouse, with the exceptions set to continue).

Thanks.
Udhay

Dec 1 '05 #9
Hi Udhay

I followed Cor's suggestion to the letter and the browser control appears as
expected. Are you doing this in a simple Windows form, or are you creating
an MDI application?

Charles
<sh*****@gmail. com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Charles,

When I set the CLR Exceptions to 'Continue' and run the application, I
do not even see the browser control on the tab. Once again, this is
happenning only when I have the browser control on a tab within an User
Control; if I do the same thing in a regular windows application
everything works fine! (ofcouse, with the exceptions set to continue).

Thanks.
Udhay

Dec 1 '05 #10

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

Similar topics

0
1966
by: benchong | last post by:
hi does anybody know how to initiatize the AxWebBrowser control with a cookie? the problem is each time i create a new AxWebBrowser control and do a AxWebBrowser1.navigate to a page, i need to execute a login. what i wanted is to execute a login once, get the cookie returned, and when i navigate to it the next time in a new AxWebBrowser control i can avoid the login sequence if the new control has the same cookie.
4
3784
by: Martin Ho | last post by:
Hey Everyone, I really hope there is someone who can figure out this problem. Honestly, I spent 3 days now trying to find the solution, but nothing works. I'll try to explain the problem shortly, so I don't take too much of your time. Problem:
1
1543
by: Arturo j Torres | last post by:
Hi! I wrote an app to log-in and retrieve a numer of webpages. To do this I have used an AxWebBrowser, controlling the iexplorer with SendKeys (yes, i know this is anything but elegant, but i like the iexplorer doing all dirty work ;). The only problem for this, is that the control must have the focus (and therefore be visible)... Now, i'm trying to make things in a better way, but the
1
2319
by: Mantorok | last post by:
Hi Is there anyway to get a WebBrowser to work without placing it on a form. I want to be able to instantiate a browser, complete some of the fields and submit, but whenever I try to navigate I get: An unhandled exception of type 'InvalidActiveXStateException' occurred in axinterop.shdocvw.dll
3
10206
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the probablem has come back even if both are installed. When I open a windows form that has the Browser on it and try to Navigate to a page using the OnEnter or OnLoad events, the page just sits there and does
12
6928
by: Don Juan | last post by:
I have had a terrible 10 days period with AxWebBrowser ActiveX Control. I can't understand why there is no goog documentation and tutorials for that monster.
5
1811
by: Thom Little | last post by:
I have a windows application that has an update form that uses AxWebBrowser to connect to a distribution site. This site uses a Response.Redirect to download of either a .msi file or a .zip file. I have tried this under four systems Windows XP, Windows 2000, Server 2003 with mixed results. Sometimes the .msi file is blocked. Sometime the .zip file is blocked. Sometimes both are blocked. Sometimes neither is blocked. If the...
3
1355
by: Andy Chen | last post by:
Hi, I am using AxWebBrowser control and I met a problem. I need to browse several different languages page. I have to change the default IE language setting at runtime. This can be done by change the key value of HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\AcceptLanguage. But the new setting won't apply to the current AxWebBrowser control instance unless I close and reopen the program or hit the OK button on IE...
6
3767
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the AxWebBrowser.Document: When I print browser.Document.GetType().ToString() at runtime, I get "mshtml.HTMLDocumentClass". But The VS2005 compiler does not recognize the member AxWebBrowser.Document as anything other than a System.Object -- e.g.,...
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.