473,499 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SP2 breaks AxWebBrowser

My problem is similar to the thread entited, "SP2 kills my AxWebBrowser"
except that I haven't been able to get the fixes to work for me.

I've written an application that uses an embedded WebBrowser control for
most of it's UI. (At the time it seemed like a good idea, but in retrospect
I think it was more work than it was worth.) In it, I first navigate to
about:blank, wait for the browser to be ready, and then write my html to the
control. The code looks something like this:

object o = null;
axWebBrowser1.Navigate("about:blank", ref o, ref o, ref o, ref o);

// Wait for the control the be initialized and ready.
while(axWebBrowser1.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE)
Application.DoEvents();

// Update the HTML
IHTMLDocument2 doc;
object boxDoc = axWebBrowser1.Document;
doc = (IHTMLDocument2)boxDoc;

doc.body.innerHTML = "";
doc.write(str);

// Use this class for event handling.
// Need to create a function as follows to handle these messages:
// [DispId(0)]
// public void DefaultMethod()
//
// Get the event as follows:
// IHTMLEventObj e = document.parentWindow.@event;
doc.onclick = this;

The problem is, that "doc" is now null when I try to retrieve it. So I
assume I need to somehow first display the IE security bar to the user, wait
for them to click on it and then after they have given me permission,
proceed as normal. I've tried simply re-adding the control and shdocvw.dll
but with no luck.

The other thread suggests implementing some interfaces (which I didn't have
to do before, so I'm not sure that I need to now.) Perhaps I just need to
implement one of these interfaces so the IE security bar will display?

So I guess the question is in summary:
1) Why is axWebBrowser1.Document null?
2) What is the easiest way to make IE trust my application?

Thanks in advance,
Andy
Nov 16 '05 #1
2 2126
Hi Andy! I think your question belongs in a different group:

http://msdn.microsoft.com/newsgroups...&lang=en&cr=US

Watch for line breaks!

"Andy Heitke" wrote:
My problem is similar to the thread entited, "SP2 kills my AxWebBrowser"
except that I haven't been able to get the fixes to work for me.

I've written an application that uses an embedded WebBrowser control for
most of it's UI. (At the time it seemed like a good idea, but in retrospect
I think it was more work than it was worth.) In it, I first navigate to
about:blank, wait for the browser to be ready, and then write my html to the
control. The code looks something like this:

object o = null;
axWebBrowser1.Navigate("about:blank", ref o, ref o, ref o, ref o);

// Wait for the control the be initialized and ready.
while(axWebBrowser1.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE)
Application.DoEvents();

// Update the HTML
IHTMLDocument2 doc;
object boxDoc = axWebBrowser1.Document;
doc = (IHTMLDocument2)boxDoc;

doc.body.innerHTML = "";
doc.write(str);

// Use this class for event handling.
// Need to create a function as follows to handle these messages:
// [DispId(0)]
// public void DefaultMethod()
//
// Get the event as follows:
// IHTMLEventObj e = document.parentWindow.@event;
doc.onclick = this;

The problem is, that "doc" is now null when I try to retrieve it. So I
assume I need to somehow first display the IE security bar to the user, wait
for them to click on it and then after they have given me permission,
proceed as normal. I've tried simply re-adding the control and shdocvw.dll
but with no luck.

The other thread suggests implementing some interfaces (which I didn't have
to do before, so I'm not sure that I need to now.) Perhaps I just need to
implement one of these interfaces so the IE security bar will display?

So I guess the question is in summary:
1) Why is axWebBrowser1.Document null?
2) What is the easiest way to make IE trust my application?

Thanks in advance,
Andy

Nov 16 '05 #2
Sorry about that, this is my first post. Thanks for the tip, I'll repost
there.
Nov 16 '05 #3

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

Similar topics

0
1525
by: Lecture Snoddddgrass | last post by:
Hi, I noticed that my WinForms app was taking a while to start up. I stepped through the code to find out which line was causing the delay. The delay is occurring within one of my UserControls...
4
4774
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...
4
3769
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
2897
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...
0
1573
by: beau | last post by:
Hi, I'm using the AxWebBrowser in a C# WinForms application. I've got the basics working, but need some help controlling the view options for browsing files. How can I disable the...
3
10195
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...
3
2557
by: MeNotHome | last post by:
I have been trying to find all the properties and methods documentation on the axwebbrowser control. For example a list of follwing and their results axwebbrowser.document.body.outerhtml...
7
6777
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...
6
3758
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...
0
7130
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
7007
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...
0
7220
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...
1
6893
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
7386
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...
1
4918
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...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
295
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...

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.