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

CSharp Resize flicker and flashing of WebBrowser TreeView controls

I have tried everything under the sun to get rid of horrible flashing
and flickering that occurs on a CSharp form when the form hosts a
TreeView or WebBrowser control and then you resize the form.

Here is what I've tried so far:
1. Turning off CS_VREDRAW and CS_HREDRAW in both the parent form and a
subclass of the control via the "override CreateParams" property
(these values were already off).

2. Setting various styles and handling the OnPaintBackground to do
nothing while also filtering WM_ERASEBKGND during the OnNotifyMessage
event. This was done by the following in the form and control
sub-class constructor:
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);

// Allows for catching the WM_ERASEBKGND message
SetStyle(ControlStyles.EnableNotifyMessage, true);

3. Setting WS_CLIPCHILDREN in the form's CreateParams (was already
set).

Just for fun I tried Delphi and made a form with both controls and the
resize has no flicker whatsoever so I know this is possible.

Thanks in advance for any help.
Nov 15 '05 #1
5 6617
Mine don't flicker at all. Are you familiar with BeginUpdate and EndUpdate
in .NET?

Because we've had reports of severe flickering from 2 people now, I'm just
wondering if there's a buggy video driver out there. Could you describe
your system?

"Ian Stiles" <is*****@xmission.com> wrote in message
news:2e**************************@posting.google.c om...
I have tried everything under the sun to get rid of horrible flashing
and flickering that occurs on a CSharp form when the form hosts a
TreeView or WebBrowser control and then you resize the form.

Here is what I've tried so far:
1. Turning off CS_VREDRAW and CS_HREDRAW in both the parent form and a
subclass of the control via the "override CreateParams" property
(these values were already off).

2. Setting various styles and handling the OnPaintBackground to do
nothing while also filtering WM_ERASEBKGND during the OnNotifyMessage
event. This was done by the following in the form and control
sub-class constructor:
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);

// Allows for catching the WM_ERASEBKGND message
SetStyle(ControlStyles.EnableNotifyMessage, true);

3. Setting WS_CLIPCHILDREN in the form's CreateParams (was already
set).

Just for fun I tried Delphi and made a form with both controls and the
resize has no flicker whatsoever so I know this is possible.

Thanks in advance for any help.

Nov 15 '05 #2

I have tried this on three completely different machines running Windows
XP.

The BeginUpdate and EndUpdate are only useful if you are adding or
removing items to TreeView. There are no such functions on the
WebBrowser control.

A. Does your program fill dock the controls?
B. Do you have "Show window contents while dragging" turned on?
(Right-click desktop, Appearance, Effects)
C. Do you see any artifacts when dragging the window borders?

If I turn this off I don't have the flicker, but many users do turn it
on and it makes your app look like a VB hack app. Remember, Delphi
doesn't have this problem.

Thanks.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #3
I have tried this on three completely different machines running Windows
XP.

The BeginUpdate and EndUpdate are only useful if you are adding or
removing items to TreeView. There are no such functions on the
WebBrowser control.

A. Does your program fill dock the controls?
B. Do you have "Show window contents while dragging" turned on?
(Right-click desktop, Appearance, Effects)
C. Do you see any artifacts when dragging the window borders?

If I turn this off I don't have the flicker, but many users do turn it
on and it makes your app look like a VB hack app. Remember, Delphi
doesn't have this problem.

Thanks.

"Michael A. Covington" <lo**@www.covingtoninnovations.com.for.address> wrote in message news:<OB**************@TK2MSFTNGP10.phx.gbl>...
Mine don't flicker at all. Are you familiar with BeginUpdate and EndUpdate
in .NET?

Because we've had reports of severe flickering from 2 people now, I'm just
wondering if there's a buggy video driver out there. Could you describe
your system?

"Ian Stiles" <is*****@xmission.com> wrote in message
news:2e**************************@posting.google.c om...
I have tried everything under the sun to get rid of horrible flashing
and flickering that occurs on a CSharp form when the form hosts a
TreeView or WebBrowser control and then you resize the form.

Here is what I've tried so far:
1. Turning off CS_VREDRAW and CS_HREDRAW in both the parent form and a
subclass of the control via the "override CreateParams" property
(these values were already off).

2. Setting various styles and handling the OnPaintBackground to do
nothing while also filtering WM_ERASEBKGND during the OnNotifyMessage
event. This was done by the following in the form and control
sub-class constructor:
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);

// Allows for catching the WM_ERASEBKGND message
SetStyle(ControlStyles.EnableNotifyMessage, true);

3. Setting WS_CLIPCHILDREN in the form's CreateParams (was already
set).

Just for fun I tried Delphi and made a form with both controls and the
resize has no flicker whatsoever so I know this is possible.

Thanks in advance for any help.

Nov 15 '05 #4
I have "Show window contents while dragging" turned on and I can't reproduce
the problem.

Can someone post, on a web site, a complete C# program that demonstrates the
problem?

I still think it is video driver bugs -- perhaps .NET is calling the video
driver in a different way than Delphi, and thus exposing a problem with a
few video drivers.

"Ian Stiles" <is*****@xmission.com> wrote in message
news:2e**************************@posting.google.c om...
I have tried this on three completely different machines running Windows
XP.

The BeginUpdate and EndUpdate are only useful if you are adding or
removing items to TreeView. There are no such functions on the
WebBrowser control.

A. Does your program fill dock the controls?
B. Do you have "Show window contents while dragging" turned on?
(Right-click desktop, Appearance, Effects)
C. Do you see any artifacts when dragging the window borders?

If I turn this off I don't have the flicker, but many users do turn it
on and it makes your app look like a VB hack app. Remember, Delphi
doesn't have this problem.

Thanks.

"Michael A. Covington" <lo**@www.covingtoninnovations.com.for.address>

wrote in message news:<OB**************@TK2MSFTNGP10.phx.gbl>...
Mine don't flicker at all. Are you familiar with BeginUpdate and EndUpdate in .NET?

Because we've had reports of severe flickering from 2 people now, I'm just wondering if there's a buggy video driver out there. Could you describe
your system?

"Ian Stiles" <is*****@xmission.com> wrote in message
news:2e**************************@posting.google.c om...
I have tried everything under the sun to get rid of horrible flashing
and flickering that occurs on a CSharp form when the form hosts a
TreeView or WebBrowser control and then you resize the form.

Here is what I've tried so far:
1. Turning off CS_VREDRAW and CS_HREDRAW in both the parent form and a
subclass of the control via the "override CreateParams" property
(these values were already off).

2. Setting various styles and handling the OnPaintBackground to do
nothing while also filtering WM_ERASEBKGND during the OnNotifyMessage
event. This was done by the following in the form and control
sub-class constructor:
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);

// Allows for catching the WM_ERASEBKGND message
SetStyle(ControlStyles.EnableNotifyMessage, true);

3. Setting WS_CLIPCHILDREN in the form's CreateParams (was already
set).

Just for fun I tried Delphi and made a form with both controls and the
resize has no flicker whatsoever so I know this is possible.

Thanks in advance for any help.

Nov 15 '05 #5
Michael A. Covington wrote:
I have "Show window contents while dragging" turned on and I can't reproduce
the problem.

Can someone post, on a web site, a complete C# program that demonstrates the
problem?

I still think it is video driver bugs -- perhaps .NET is calling the video
driver in a different way than Delphi, and thus exposing a problem with a
few video drivers.


Hmm... I'm the one having the trouble with flickering when adding items
to list boxes/views, but I can't reproduce any flicker at all with a
tree view that resizes with the form.

Weird...
Nov 15 '05 #6

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

Similar topics

8
by: Ian Stiles | last post by:
If you have "Show window contents while dragging" turned on (Right-click desktop, Appearance, Effects) then you get horrible flashing and flickering on a CSharp form when the form hosts a...
1
by: Vili | last post by:
Hi all I am using visual studio.net (Csharp) and I have and MSSQL -database with news. I would like to put a tree view similar to outlook and explorer to my site. I know there is a web tool...
3
by: Per Dunberg | last post by:
Hi all, I have to develop a "skinned" application and I have a problem with the graphics. When a form is loaded and displayed there's aways a flicker where all the controls are located on the...
5
by: Jim Hubbard | last post by:
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.
1
by: Jon Turner | last post by:
I have a MDI app with a treeview that controls the displaying/activation of a MDI Child. Problem is that when activating/showing the MDI child, I get a flicker caused by the Repaint of the...
8
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me...
0
by: Sladan | last post by:
I have a WebBrowser and I'm using it like this: webSummary.DocumentText = temp; Where temp is a string containing som text and sometimes a <img src = "..." /> tag. If the string contains a...
4
by: Frank Rizzo | last post by:
Hello, I inherited a large Winforms project that is suffering from excessive flicker when switching between portions of the application. I've noticed that most parts of the application (user...
1
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, i am looking for a way to clear and fill a listview and right after a treeview nearly flicker and delay free. The TreeView and Listview contain Images and about 1000 Items. What can someone...
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
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...
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
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.