473,698 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

AxWebBrowser problems in VS2005

It appears that I cannot correctly install the AxWebBrowser in VS2005.

I can instantiate an "AxWebBrows er browser" and refer to its members,
properties, and methods. I'm having trouble with the AxWebBrowser.Do cument:
When I print browser.Documen t.GetType().ToS tring() at runtime, I get
"mshtml.HTMLDoc umentClass". But The VS2005 compiler does not recognize the
member AxWebBrowser.Do cument as anything other than a System.Object -- e.g.,
"Define doc As mshtml.HTMLDocu mentClass = browser.Documen t" will fail to
compile with "Type 'mshtml.HTMLDoc umentClass' is not defined."

When I try to install the missing component(s) via "aximp" and "tlbimp",
there seems to be no effect whatsoever. The commands I run in the project
directory, in a VS.NET Command Prompt, are:

aximp c:\windows\syst em32\shdocvw.dl l
tlbimp mshtml.tlb

The only suspicious behavior that goes on during the installation itself is
a short list of warnings generated by tlbimp. They are as follows:

TlbImp : warning TI0000 : At least one of the arguments for
'IActiveIMMApp. GetDe faultIMEWnd' cannot be marshaled by the runtime
marshaler. Such arguments will therefore be passed as a pointer and may
require unsafe code to manipulate.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0010.hbmpCheck ed'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0010.hbmpUnche cked'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0010.hbmpItem' .
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '_userBITMAP.pB uffer'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0011.hbmpCheck ed'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0011.hbmpUnche cked'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0011.hbmpItem' .
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '_FLAGGED_BYTE_ BLOB.abData'.
Type library imported to MSHTML.dll

Whether or not these warnings are significant enough to prevent proper
installation, I do not know. In any event, the control doesn't seem to be
getting installed correctly at all. Any advice on doing this correctly or
determing the point of failure of this component's installation in the dev
environment?

--------

Bonus points: I am afraid I'm missing the bigger picture with typecasting in
VB .NET 2.0. Even though the compiler thinks AxWebBrowser.Do cument is a
simple Object, it still lets me reference members within it that only exist
in mshtml.HTMLDocu mentClass. That is, it doesn't complain that System.Object
has no such member as "documentelemen t". In fact, I've even tried nonsense
strings like "foobar" -- anything goes! The compiler will allow me to
pretend that AxWebBrowser.Do cument has any imaginary members I want it to
have, and then waits until runtime to see if I'm right. If the member does
exist, then great, the runtime environment hands it to me as a plain
System.Object. (From there, I can even continue printing out
GetType().ToStr ing(). In this manner I've learned of the existence of a
whole slew of classes I should have but don't have, such as
mshtml.HTMLHtml ElementClass.) Otherwise -- that is, if the member doesn't
exist ("foobar" or what have you) -- it hangs forever trying to search for
it. My questions are:
1) Why is the compiler so relaxed about missing datatypes, coercing them
upwards into Objects instead of complaining that they're missing?
2) Why does the compiler get so lenient about nonexistent members whenever
this happens?
3) Why does VB .NET hang whenever it can't find something, rather than
gracefully reporting the problem (e.g., by throwing an exception)?
May 31 '06 #1
6 3764
Dave,

Are you using the AxWebBrowser of the Net 2.0 Webbrowser.

Cor

"Dave Booker" <db******@newsg roup.nospam> schreef in bericht
news:1F******** *************** ***********@mic rosoft.com...
It appears that I cannot correctly install the AxWebBrowser in VS2005.

I can instantiate an "AxWebBrows er browser" and refer to its members,
properties, and methods. I'm having trouble with the
AxWebBrowser.Do cument:
When I print browser.Documen t.GetType().ToS tring() at runtime, I get
"mshtml.HTMLDoc umentClass". But The VS2005 compiler does not recognize
the
member AxWebBrowser.Do cument as anything other than a System.Object --
e.g.,
"Define doc As mshtml.HTMLDocu mentClass = browser.Documen t" will fail to
compile with "Type 'mshtml.HTMLDoc umentClass' is not defined."

When I try to install the missing component(s) via "aximp" and "tlbimp",
there seems to be no effect whatsoever. The commands I run in the project
directory, in a VS.NET Command Prompt, are:

aximp c:\windows\syst em32\shdocvw.dl l
tlbimp mshtml.tlb

The only suspicious behavior that goes on during the installation itself
is
a short list of warnings generated by tlbimp. They are as follows:

TlbImp : warning TI0000 : At least one of the arguments for
'IActiveIMMApp. GetDe faultIMEWnd' cannot be marshaled by the runtime
marshaler. Such arguments will therefore be passed as a pointer and may
require unsafe code to manipulate.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member
'__MIDL___MIDL_ itf_mshtml_0256 _0010.hbmpCheck ed'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member
'__MIDL___MIDL_ itf_mshtml_0256 _0010.hbmpUnche cked'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0010.hbmpItem' .
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '_userBITMAP.pB uffer'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member
'__MIDL___MIDL_ itf_mshtml_0256 _0011.hbmpCheck ed'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member
'__MIDL___MIDL_ itf_mshtml_0256 _0011.hbmpUnche cked'.
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '__MIDL___MIDL_ itf_mshtml_0256 _0011.hbmpItem' .
TlbImp : warning TI0000 : The type library importer could not convert the
signat ure for the member '_FLAGGED_BYTE_ BLOB.abData'.
Type library imported to MSHTML.dll

Whether or not these warnings are significant enough to prevent proper
installation, I do not know. In any event, the control doesn't seem to be
getting installed correctly at all. Any advice on doing this correctly or
determing the point of failure of this component's installation in the dev
environment?

--------

Bonus points: I am afraid I'm missing the bigger picture with typecasting
in
VB .NET 2.0. Even though the compiler thinks AxWebBrowser.Do cument is a
simple Object, it still lets me reference members within it that only
exist
in mshtml.HTMLDocu mentClass. That is, it doesn't complain that
System.Object
has no such member as "documentelemen t". In fact, I've even tried
nonsense
strings like "foobar" -- anything goes! The compiler will allow me to
pretend that AxWebBrowser.Do cument has any imaginary members I want it to
have, and then waits until runtime to see if I'm right. If the member
does
exist, then great, the runtime environment hands it to me as a plain
System.Object. (From there, I can even continue printing out
GetType().ToStr ing(). In this manner I've learned of the existence of a
whole slew of classes I should have but don't have, such as
mshtml.HTMLHtml ElementClass.) Otherwise -- that is, if the member doesn't
exist ("foobar" or what have you) -- it hangs forever trying to search for
it. My questions are:
1) Why is the compiler so relaxed about missing datatypes, coercing them
upwards into Objects instead of complaining that they're missing?
2) Why does the compiler get so lenient about nonexistent members whenever
this happens?
3) Why does VB .NET hang whenever it can't find something, rather than
gracefully reporting the problem (e.g., by throwing an exception)?

May 31 '06 #2
I'm trying to use the AxWebBrowser. As far as I can tell the .NET 2.0
WebBrowser doesn't expose all of the functionality I need.

"Cor Ligthert [MVP]" wrote:
Dave,

Are you using the AxWebBrowser of the Net 2.0 Webbrowser.

Cor


May 31 '06 #3
Dave,

I and probably me not alone (and seeing people strugling with that) did
never succeed in direct instancing the AxWebbrowser. Did you already drag an
webbrowser on a form from the toolbox?

Cor

"Dave Booker" <db******@newsg roup.nospam> schreef in bericht
news:B5******** *************** ***********@mic rosoft.com...
I'm trying to use the AxWebBrowser. As far as I can tell the .NET 2.0
WebBrowser doesn't expose all of the functionality I need.

"Cor Ligthert [MVP]" wrote:
Dave,

Are you using the AxWebBrowser of the Net 2.0 Webbrowser.

Cor

May 31 '06 #4
Hi Dave,

Thank you for posting.

The Documnent property of the AxWebBrowser is Object typed and read-only.
There's a Navigate() method in the AxWebBrowser class which could be used
to display a url resource such as a html page, a jpg file, a word document
and so on. Then at run-time, we could use the Document property of the
AxWebBrowser to get an object representing the resource currently displayed
in the AxWebBrowser control. The type of the Document varies with the type
of the resource which the AxWebBrowser is browsing. For example, if the
resource is a html page, the type of the Document will be
"mshtml.HTMLDoc umentClass". And if the resource is a word document, the
type of the Document will be "Microsoft.Offi ce.Interop.Word .DocumentClass" .
That is to say, the compiler could not determine which type the Document is
at design-time.

Because the resource is accessed and displayed at run-time, the compiler
could not check out any error when compiling even if the resource doesn't
exist. When running, a default web page saying "The page cannot be
displayed" will appear in the AxWebBrowser control if the resource doesn't
exist and it doesn't take a long time to display this default web page. I
have performed a test and confirmed this.

Hope this is helpful to you.
If you have any concerns or need anything else, please don't hesitate to
let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =======
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=============== =============== =============== =======

May 31 '06 #5
"Dave Booker" <db******@newsg roup.nospam> schrieb:
I'm trying to use the AxWebBrowser. As far as I can tell the .NET 2.0
WebBrowser doesn't expose all of the functionality I need.


Which functionality do you need? Note that
'WebBrowser1.Do cument.DomDocum ent' provides access to the unmanaged document
object.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

May 31 '06 #6
Hi Dave,

You have mentioned that "Define doc As mshtml.HTMLDocu mentClass =
browser.Documen t" will fail to compile with "Type
'mshtml.HTMLDoc umentClass' is not defined."

The type HTMLDocumentCla ss is located in Microsoft.mshtm l assembly and the
namespace is mshtml. To use the type HTMLDocumentCla ss in your code, you
should add a reference to Microsoft.mshtm l into your project.

Hope this is helpful to you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =======
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=============== =============== =============== =======

Jun 6 '06 #7

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

Similar topics

4
4801
by: TF | last post by:
hi, i am using AxWebBrowser control in my C# dot.net windows application. i want to display a web page in the browser that needs some data sent to it through HTML Form 'POST' method. I saw a method 'Navigate' of AxWebBrowser control that has a parameter 'ref object postData' but didn't find any documentation about AxWebBrowser how to use it. i tried a string like "name1=value1&name2=value2" but it doesn't work. Any help?? Thanks
4
3780
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:
0
2912
by: Matthias Kwiedor | last post by:
I have a aplication which hosts an axWebbrowser. This activex component needs about 10 to 15 mb of memory. Because i have a option to move the aplication to tray icon and do some timer work i don't want that it just spends over 10mb for nothing. So i remove the axwebbrowser with axwebbrowser1.dispose() which works fine. After show the application back from the tray icon i will implement the axwebbrowser again with the same i did it...
1
1767
by: Les Caudle | last post by:
I created an app that uses an axWebBrowser control to display a local xml file and had no problems. When the form is initially loaded, it displays an htm file that says no file is loaded: object o = System.Reflection.Missing.Value; axWebBrowser1.Navigate(@"file:///" + ((string)(Application.StartupPath + @"\noXml.htm")).Replace(@"\",@"/"), ref o, ref o, ref o, ref o);
3
10204
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
3
1123
by: gogaz | last post by:
Hi, I am not sure if I am doing somthing wrong, but the forms with AxWebBrowser control in my VB.NET application takes time to load and show up on screen when i run in Debug mode in VS Computer Config: P4 3.2 1GB RAM 160 GB SATA HDD
6
11249
by: ESmith | last post by:
I'm looking to user a web browser component in VS2005. I like the functionality in the AXWebBrowser component (from ActiveX controls page) that allows me to do this: mshtml.HTMLDocument doc; doc = (mshtml.HTMLDocument)this.SecureWebBrowser.Document; mshtml.HTMLButtonElement ButtonTest =
7
6788
by: Doe | last post by:
Okay, I've given up on using the "new" WebBrowser in 2005 to do what I want to do -- tabbed browsing. It seems I really need RegisterAsBrowser and Application to get each instance of a browser working on each tab (and those methods are not available in 2005). I found some code on MSDN forums, but the extention didn't really cover RegisterAsBrowser. Someone told me how to do it, but it's in c and basically over my head. Even though he...
0
1148
by: thirunavukarasukm | last post by:
Hai. I created one windows application.I am add reference control to add Microsoft WebBrowser Control..In my application I am using HTTPWebRequest and HttpWebResponse class .To request some post message to corresponding URL.Then I will get response string. In response string i am go to create one .HTML extension file.Then I am using AxWebBrowser Class Create Object .Then I am using this object ...
0
8685
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
8612
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
9032
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...
0
8880
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
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
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
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.