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

Two Questions concerning the WebBrowser Control

Hi all,

Today I downloaded and installed VS 2005 C# Express Edition (.NET
framework 2.0). I'm very pleased about this new product.

In my current application I'm using the WebBrowser control in a child
form. Two questions:

1) Does the user need IE to get this control working?
2) I cancel the closing of the child form in it's FormClosing event and
hide the form instead because of frequent navigation request coming
from the parent form. But I'm a bit confused/concerned with the help I
found on MSDN concerning the WebBrowser control: "Be sure to call the
Dispose method when you are finished using the control to ensure that
all resources are released in a timely fashion. You must call the
Dispose method on the same thread that attached the events, which
should always be the message or user-interface (UI) thread." I do not
want to spill memory on an end-user's machine. So my question: do I
need to call - and if so where - the Dispose method somewhere in my
parent/child form?

Thanks in advance for your time,
Frederik

Nov 17 '05 #1
2 1828
Hi,

To answer your first question, yes, IE is needed. In fact, the WebBrowser
component in .NET 2.0 is still a wrap-up of Internet Explorer, though it is
a much more advanced one than in .NET 1.1. It now does not use the COM
interface, but directly the IE APIs. But still, it is IE behind.

For your second question, I would say you should not call the finalizer, as
you just want to prevent the form from being seen, but it should keep it in
memory. Doing so would offset the benefits of your technique.

Cheers,

JP
<fr********@gmail.com> a écrit dans le message de news:
11**********************@g14g2000cwa.googlegroups. com...
Hi all,

Today I downloaded and installed VS 2005 C# Express Edition (.NET
framework 2.0). I'm very pleased about this new product.

In my current application I'm using the WebBrowser control in a child
form. Two questions:

1) Does the user need IE to get this control working?
2) I cancel the closing of the child form in it's FormClosing event and
hide the form instead because of frequent navigation request coming
from the parent form. But I'm a bit confused/concerned with the help I
found on MSDN concerning the WebBrowser control: "Be sure to call the
Dispose method when you are finished using the control to ensure that
all resources are released in a timely fashion. You must call the
Dispose method on the same thread that attached the events, which
should always be the message or user-interface (UI) thread." I do not
want to spill memory on an end-user's machine. So my question: do I
need to call - and if so where - the Dispose method somewhere in my
parent/child form?

Thanks in advance for your time,
Frederik

Nov 30 '05 #2
Thank you for your helpful answers JP.

Frederik

Dec 2 '05 #3

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

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
9
by: ASP .NET Newbie | last post by:
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the WebBrowser (AxWebBrowser)? Thanks, Chad
0
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,...
4
by: Yoram Biberman | last post by:
I have a few questions concerning concurrency control. I shall thank whoever can help me. Question #1 ========= Assume the following (concurrent) schedule, in which both transactions run in a...
1
by: Jim | last post by:
Is there a way to detect a click, double-click or right-click within the document of a webbrowser control? Furthermore, is there a way to determine which object the user clicked? Thanks for...
12
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...
8
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 : ...
11
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
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.