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

Webbrowser control : Removing redraw when changing pages

Hi all,
I'm using a webbrowser control within an application for the UI and want
to hide the flicker and redraw when changing pages. Ideally I want to
render the new page to a seperate offscreen buffer then fade this over
the exisiting page. Can anyone recommend a good way to approach this?

thanks

Martin
Jul 20 '08 #1
6 3269
Martin,

That's something that I think is really beyond your control. There are
a number of things that are going on when you reload a page, even if you are
limiting yourself to just the redrawing operation (the page elements, active
x controls, etc, etc) and the WebBrowser control doesn't allow hooks into
that operation.

If you have control of the server side, you are better off using AJAX to
load data into the page and then modify the elements of the page after it
downloads data from the server.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Martin Slater" <ms*****@hellinc.netwrote in message
news:48*********************@news.astraweb.com...
Hi all,
I'm using a webbrowser control within an application for the UI and want
to hide the flicker and redraw when changing pages. Ideally I want to
render the new page to a seperate offscreen buffer then fade this over the
exisiting page. Can anyone recommend a good way to approach this?

thanks

Martin
Jul 20 '08 #2
Thanks for the reply Nicholas, I'm gonna still remain hopeful for a bit
longer until the more 'hacky' options are eliminated as well;)

I tried to fake this by creating 2 webbrowser controls, hiding the one
that is currently loading then flipping them when the hidden page is
fully loaded (by waiting for a DocumentCompleted event) but this didn't
seem to work. Do you have any idea if
a) a hidden webbrowser control will render anything at all (or a way
to make it do so without being visible on screen)
b) a DocumentCompleted event is fired after the page has fully and
completely loaded?

thanks again

Martin

Nicholas Paldino [.NET/C# MVP] wrote:
Martin,

That's something that I think is really beyond your control. There
are a number of things that are going on when you reload a page, even if
you are limiting yourself to just the redrawing operation (the page
elements, active x controls, etc, etc) and the WebBrowser control
doesn't allow hooks into that operation.

If you have control of the server side, you are better off using AJAX
to load data into the page and then modify the elements of the page
after it downloads data from the server.

Jul 20 '08 #3
It might be better to take an image of the browser control before it flickers
and show that over the top while your control renders the new page. Then you
could put it front when the loading has completed. I have a class on my blog
(specified below) which will give you an image for a control. You could then
use that in a picturebox. Would probably be a lot more light weight then
having 2 browsers.

I cant answer you first question you asked, but the document completed event
does fire after everything has been loaded. Including all images as well I
believe.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Martin Slater" wrote:
Thanks for the reply Nicholas, I'm gonna still remain hopeful for a bit
longer until the more 'hacky' options are eliminated as well;)

I tried to fake this by creating 2 webbrowser controls, hiding the one
that is currently loading then flipping them when the hidden page is
fully loaded (by waiting for a DocumentCompleted event) but this didn't
seem to work. Do you have any idea if
a) a hidden webbrowser control will render anything at all (or a way
to make it do so without being visible on screen)
b) a DocumentCompleted event is fired after the page has fully and
completely loaded?

thanks again

Martin

Nicholas Paldino [.NET/C# MVP] wrote:
Martin,

That's something that I think is really beyond your control. There
are a number of things that are going on when you reload a page, even if
you are limiting yourself to just the redrawing operation (the page
elements, active x controls, etc, etc) and the WebBrowser control
doesn't allow hooks into that operation.

If you have control of the server side, you are better off using AJAX
to load data into the page and then modify the elements of the page
after it downloads data from the server.
Jul 20 '08 #4
I haven't tried this, but it might be possible to use JavaScript to fade
out/in the page as long as you can programmatically alter the HTML
code/OnLoad (OnUnload?) events inside the WebBrowser. There are webpages
which do exactly this.

Best Regards,
Stanimir Stoyanov | www.stoyanoff.info

"Martin Slater" <ms*****@hellinc.netwrote in message
news:48*********************@news.astraweb.com...
Hi all,
I'm using a webbrowser control within an application for the UI and want
to hide the flicker and redraw when changing pages. Ideally I want to
render the new page to a seperate offscreen buffer then fade this over the
exisiting page. Can anyone recommend a good way to approach this?

thanks

Martin
Jul 20 '08 #5
On Jul 20, 6:28*am, Martin Slater <msla...@hellinc.netwrote:
Hi all,

I'm using a webbrowser control within an application for the UI and want
to hide the flicker and redraw when changing pages. Ideally I want to
render the new page to a seperate offscreen buffer then fade this over
the exisiting page. Can anyone recommend a good way to approach this?

thanks

Martin
Jul 22 '08 #6
On Jul 20, 6:28*am, Martin Slater <msla...@hellinc.netwrote:
Hi all,

I'm using a webbrowser control within an application for the UI and want
to hide the flicker and redraw when changing pages. Ideally I want to
render the new page to a seperate offscreen buffer then fade this over
the exisiting page. Can anyone recommend a good way to approach this?

thanks

Martin
Dear Martin
I am not very much practiced person of .NET . But here I may suggest
something.
You can make the browser window transperent (don't make fully
transprent) I saw similar appreach in "Paint.NET" . Just google it.
Its opensource software. In it when you move the mouse out of the
color toolbox that tool window becomes opaque.

yours
Advait
Jul 22 '08 #7

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

Similar topics

1
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
5
by: Charles Law | last post by:
Sorry for the cross post, but I'm not sure who is best placed to answer this one. This is the most bizarre behaviour of MSHTML and streams. I have a WebBrowser control that contains nothing...
0
by: Ziyad Makki | last post by:
Hello, I have created a Web Composite Control. I have also created a designer class that is used to render the control at design time. All though it dose work, I have been experiencing some...
1
by: MrGiga (Robb Sadler) | last post by:
I have a set of pages with C# code attached to manage session information. They hang their info off of the session string and store it in a MSDE table. I have all of this code working well in one...
9
by: Jason Boardman | last post by:
Can anyone tell me how I can write HTML to a WebBrowser control in Visual Basic 6? I want to display HTML in the browser that is generated from within my VB program (as opposed to loading it from...
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
17
by: Cesar | last post by:
Hello people. I'm having a Winform app that contains a webbrowser control that keeps navigating from one page to another permanentrly to make some tests. The problem I'm having is that after a...
0
by: scottietrek | last post by:
I have a webbrowser control that allows me to save username and password infromation for a proxy server and i have been successful in changing the system default proxy for my application. What i now...
1
by: heyi | last post by:
hi, i'm making an app which uses a webbrowser control to show some offline (not cache) html pages like a slide show. let's say pages in a folder on the desktop etc... when it came to testing...
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: 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
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
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
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...

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.