473,378 Members | 1,355 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,378 software developers and data experts.

Problem using component AxSHDocVw.AxWebBrowser.??

i was using component AxSHDocVw.AxWebBrowser,,but i rather confuces
because when i write
AxWebBrowser1.Document. the next option is Gettype function,,,nothing
else......
But when i write AxWebBrowser1.Document.all.tags("DIV").length() the
code is running well....WHY..?? i realy confuces because
AxWebBrowser1.Document.all it's not in the library but it's not
error.....why..???

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 21 '05 #1
1 1972
Hi jokolee

AxWebBrowser1.Document is of type Object, which has only one method:
GetType. However, the Document property implements several interfaces, such
as IHTMLDocument and IHTMLDocument2.

Type the following

DirectCast(AxWebBrowser1.Document, mshtml.IHMTLDocument2)

and at the end of the line press . (period). The intellisense should list
the methods and properties supported on this interface.

The reason why your code works is that (I suspect) you have Option Strict
off by default, and this allows late binding. So, at runtime, a check is
made to see if all.tags etc. is supported, which it is, so it works. I would
recommend turning Option Strict on and explicitly qualifying the type of the
objects you are using by applying DirectCast. It might be more typing but it
is more reliable and you will get the benefit of intellisense. It will also
run more quickly because late binding is expensive of time.

HTH

Charles
"jokolee" <jo**@jau.co-dot-id.no-spam.invalid> wrote in message
news:41**********@Usenet.com...
i was using component AxSHDocVw.AxWebBrowser,,but i rather confuces
because when i write
AxWebBrowser1.Document. the next option is Gettype function,,,nothing
else......
But when i write AxWebBrowser1.Document.all.tags("DIV").length() the
code is running well....WHY..?? i realy confuces because
AxWebBrowser1.Document.all it's not in the library but it's not
error.....why..???

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 21 '05 #2

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

Similar topics

0
by: David Elliott | last post by:
I have created an application that loads assemblies (plugins). These plugins are windows forms that have an embedded browser. private AxSHDocVw.AxWebBrowser browser; If I comment out...
3
by: Simon CJC | last post by:
Hello I use AxSHDocVw.AxWebBrowser in a windows application. But sometimes the url I browsed in AxSHDocVw.AxWebBrowser contains error caused by javascript. Can I prevent javascript from running in...
0
by: Adrian Belen via .NET 247 | last post by:
hi, I have a problem when I try to open an excel document in a AxWebBrowser Component in VB.NET. The problem appear in this situation: Before to all the Excel application is opened from the...
2
by: Vicente García | last post by:
hello all, Sorry for my English. I am making up an application and I must show a web. The web contains a power point but I have a problem because I type something like: AxWebBrowser.Navigate(URL) ...
1
by: Claire | last post by:
I'm using C# in Visual Studio 2003, XP pro with latest IE plus all patches and security updates. I imported microsofts web browser control onto my tool palette from the COM tab of "Add/remove...
3
by: =?Utf-8?B?R2F1cmF2?= | last post by:
I am using the AxSHDocVw.AxWebBrowser control (named PreviewBrowser) in my C# app to load a pdf file: PreviewBrowser.Navigate(strPDF ,ref objNull,ref objNull,ref objNull,ref objNull); These PDF...
4
by: =?Utf-8?B?RGF2ZSBF?= | last post by:
I have written an application that reads third party web pages. If I am using HTTP everything works fine. I create an AxSHDocVw.AxWebBrowser object and then Navigate2 to the page. I then...
1
by: brightlight | last post by:
Hello I want to search for multiple barcodes in our local network. I am using C# and my problem is I can not build succesful Loops to search multiple barcodes. Since I need to wait for the page...
1
by: tim2006 | last post by:
When i try to run the program, it just hangs. If i remove the axwebbrowser control it works fine. Any ideas? Here is my code: class1.vb Imports System.Windows.Forms Imports...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.