.Net 2.0 - Webbrowser control flickering on resize....

  • Thread starter Thread starter Jim Hubbard
  • Start date Start date
J

Jim Hubbard

Has anyone seen a fix for the flickering effect you get when resizing a
Webbrowser control?

It's really irritating and doesn't make for a professional-looking
application.
 
Evidentially the flickering has to do with the Microsoft tab control that I
used to host the Microsoft webbrowser control. If I use a 3rd party tab
control (like DotNetBar) the flicker is almost non-existent.

But......if you know how to remedy this Microsoft tab control flicker
problem, please let me know.
 
I just tried putting the WebBrowser control on a Panel on top of the Tab control and that was really bad.
It seems that the WebBrower control does best(least amount of flickering) on a form itself. Too bad, I can
see where having a Tabbed browser would be nice ( FireFox).
james
 
In general, setting these styles on a .Net Control will eliminate flicker:

ControlStyles.DoubleBuffer
ControlStyles.AllPaintingInWmPaint
 
There is a DoubleBufferd property that is evidentially overridable
(according to
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.doublebuffered.aspx).

As I am just learning .Net (starting with .Net 2.0) I'll have to figure out
how to do this and if it will give the desired effect.

After all, if I override a protected property, aren't I just replacing it's
internal code with my own? And, if that is the case, I won't be changing
any internal settings of the Webbrowser class and won't have any effect on
its double buffering.

Does that make any sense?
 
Jim Hubbard said:
There is a DoubleBufferd property that is evidentially overridable
(according to
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.doublebuffered.aspx).

As I am just learning .Net (starting with .Net 2.0) I'll have to figure out
how to do this and if it will give the desired effect.

After all, if I override a protected property, aren't I just replacing it's
internal code with my own?
No. Whenever you create a control it is based on (derived from) the .Net
control. The properties such as DoubleBuffer are there to be set in any way
you like. You're not "overriding" the property you are just setting its value
to what you want it to be.

You are confusing overriding with setting a value. Yes you are "overriding"
the value in a sense but in C#/C++ the word "override" means to replace the
implementation of a function/method/property.

It's fine to set the value of the property - that's what it's there for.
 
Back
Top