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.InteropServices.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. 13 4200
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
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.AxWebBrowser1,
System.ComponentModel.ISupportInitialize).EndInit( )
Please help.
Thanks.
Udhay,
That is exactly the problem that I have when I did not drag it, did you drag
it on your tabpage?
Cor
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
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(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
TabControl1.SelectedTab = TabPage4
Me.AxWebBrowser1.Navigate2("www.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.googlegr oups.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
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.nospam> wrote in message
news:C8**********************************@microsof t.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.AxWebBrowser1, System.ComponentModel.ISupportInitialize).EndInit( )
Please help. Thanks.
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
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
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.googlegr oups.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
Charles,
The problem is that it is in a usercontrol. That axWebbrowser needs
something from the resx. However copying that seems for me not simple.
I have written that already in this message thread.
Cor
Hi Udhay
Cor has pointed out that you are doing this in a user control, so the trick
here is to use a second user control.
Create a control called WebViewer, say, and put the WebBrowser on that.
Then, reference the WebViewer in your main control, and put an instance of
it on your tab page. Now, when you run and subsequently select your tab
page, the browser should appear.
The reason you have to do this is that the WebBrowser control misbehaves if
it is loaded and displayed piece-meal. That's what happens when it is on a
tab page like you have. When it is in its own control it gets created and
displayed (even though you can't see it) when that control is created.
HTH
Charles
<sh*****@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.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
Hi Cor
I have re-read the thread and hadn't spotted the thing about user control.
In that case another user control is required.
I have put a fuller answer in the OP's thread.
Charles
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl... Charles,
The problem is that it is in a usercontrol. That axWebbrowser needs something from the resx. However copying that seems for me not simple.
I have written that already in this message thread.
Cor
Charles:
Thanks for explaining the reason for the axWebbrowser's behavior when used
within an user control. I will try your suggested solution.
Thanks.
Udhay
"Charles Law" wrote: Hi Udhay
Cor has pointed out that you are doing this in a user control, so the trick here is to use a second user control.
Create a control called WebViewer, say, and put the WebBrowser on that. Then, reference the WebViewer in your main control, and put an instance of it on your tab page. Now, when you run and subsequently select your tab page, the browser should appear.
The reason you have to do this is that the WebBrowser control misbehaves if it is loaded and displayed piece-meal. That's what happens when it is on a tab page like you have. When it is in its own control it gets created and displayed (even though you can't see it) when that control is created.
HTH
Charles
<sh*****@gmail.com> wrote in message news:11**********************@f14g2000cwb.googlegr oups.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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.
|
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....
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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,...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |