Hello,
I want to create a webbrowser object programmatically, navigate to a URL,
and then analyze the document.
I create the following code (simplified):
Dim ie as new webbrowser
ie.navigate "http://www.google.com"
do while isnothing(ie.document)
threading.thread.sleep 1000
loop
This does not work; there's no error, but browser object does not navigate
anywhere. Same as if I declare the ebject with withevents, navigate, and
then expect callback - it never comes.
Navigation works if I create a separate form and put webbrowser control on
it.
Why it does not work as an object?
thanks,
Vadim Rapp 2 1910
"Vadim Rapp" <vr***@nospam.polyscience.comschrieb:
I want to create a webbrowser object programmatically, navigate to a URL,
and then analyze the document.
I create the following code (simplified):
Dim ie as new webbrowser
ie.navigate "http://www.google.com"
do while isnothing(ie.document)
threading.thread.sleep 1000
loop
This does not work; there's no error, but browser object does not navigate
anywhere. Same as if I declare the ebject with withevents, navigate, and
then expect callback - it never comes.
Use the code listed at
<URL:http://dotnet.mvps.org/dotnet/code/net/#InternetLoadFileto download a
file.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Hello, Herfried!
You wrote on Sun, 24 Dec 2006 18:58:52 +0100:
HKW"Vadim Rapp" <vr***@nospam.polyscience.comschrieb:
??>I want to create a webbrowser object programmatically, navigate to a
??>URL, and then analyze the document.
??>>
??>I create the following code (simplified):
??>>
??>Dim ie as new webbrowser
??>ie.navigate "http://www.google.com"
??>do while isnothing(ie.document)
??> threading.thread.sleep 1000
??>loop
??>>
??>This does not work; there's no error, but browser object does not
??>navigate anywhere. Same as if I declare the ebject with withevents,
??>navigate, and then expect callback - it never comes.
HKWUse the code listed at
HKW<URL:http://dotnet.mvps.org/dotnet/code/net/#InternetLoadFileto
HKWdownload a file.
Thanks, but the problem is, I need to analyze the retrieved document. With
webrequest, I get a text stream, and I don't see how I can easily convert it
into htmldocument. If I save the stream to file and then navigate to it, the
relative links in the document will not resolve correctly.
I was just curious why webbrowser so much insists on being in a container.
thanks,
Vadim Rapp This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim Hubbard |
last post by:
How would I implement the IDispatch interface to handle the following in
VB.Net
<BEGIN>
Controlling Download and Execution
The WebBrowser Control gives you control over what it downloads,...
|
by: SPE - Stani's Python Editor |
last post by:
Hi,
During optimizing SPE for Ubuntu, I found something strange. I have
Ubuntu 5.10 "The Breezy Badger" and unfortunately this code is not
working:
>>> import webbrowser
>>>...
|
by: Alex Clark |
last post by:
Greetings,
(.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs).
I've decided to take advantage of the layout characteristics of HTML
documents to simplify my printing tasks, but...
|
by: Prosperz |
last post by:
Hi,
I would like to make thumbnails of web page by capture content of a
WebBrowser. By example, capture http://www.google.com.
I used WebBrowser control with Framework 2.0.
I try this :
...
|
by: Dustan |
last post by:
At http://docs.python.org/whatsnew/modules.html on the webbrowser
module, it says "A number of additional browsers were added to the
supported list such as Firefox, Opera, Konqueror, and elinks."
...
|
by: Anil Gupte |
last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot
figure out where it is in .Net
Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com
|
by: Zytan |
last post by:
I have multiple threads writing to WebBrowser (using a function that
checks InvokedRequired, and if so, invokes itself on the WebBrowser
thread) and they are getting deadlocked.
They only...
|
by: Gregory Bloom |
last post by:
I'm running Python 2.5 under Windows. If I fire up IDLE and enter:
it works like a champ, opening the page in Firefox. Same thing goes
from a Windows cmd shell: it works as advertised.
But...
|
by: kimiraikkonen |
last post by:
Hi there,
I needed to use MouseOver event on Webbrowser which is NOT provided by
webbrowser control natively(what a disappointment), so i decided to go
with another route to simulate this like:
...
|
by: TedTrippin |
last post by:
Hi,
Background - I've create a windows application in VS and added a WebBrowser component and all works well.
I'm now trying to do this programmatically. My application now listens on a socket...
|
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: 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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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,...
| |