473,396 Members | 2,030 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,396 software developers and data experts.

AxWebBrowser without form

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

I'm assuming that's because it hasn't got a handle assigned to it, is there
any other method/workaround?

Ideas?

Thanks
Kev
Nov 16 '05 #1
1 2303
Hi,
I'm not sure is this the same problem as the one i had, so maybe this is not
solution for your problem but it wont hurt if you try :)

A handle for AxWebControl is created, not when you create the control but
when it is shown.
The bug here is that when you try to close form which contains AxWebBrowser
control (actually when the GC try to dispose the control) and the control is
not yet shown so it doesn't have handle, it raises exeption similar to the
one you had mentioned.

The solution was to hide the control until you need to show it. So, after:

AxWebBrowser aWB = new AxWebBrowser(); // actually after
InitializeComponent();

somewhere in constructor add:

aWB.Hide();

and:

aWB.Show();

when you need to display it!

"Mantorok" <no**@tiscali.co.uk> wrote in message
news:cr**********@newsfeed.th.ifl.net...
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

I'm assuming that's because it hasn't got a handle assigned to it, is there any other method/workaround?

Ideas?

Thanks
Kev

Nov 16 '05 #2

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

Similar topics

4
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...
0
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...
1
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...
1
by: Christoph L | last post by:
If I open a form in a mdicontainer with an axwebbrowser-control that show´s an excel-document and I close the form first and then the application excel leaves open If I close the application...
3
by: Michael C | last post by:
Hi all, Quick question about the AxSHDocVw.AxWebBrowser Component. I was wondering if there is a way to view pages generated internally within my application without writing them to disk. For...
1
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: ...
3
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...
12
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.
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
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...
0
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,...
0
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...
0
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...
0
agi2029
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,...
0
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...

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.