473,511 Members | 15,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6631
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
5425
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
1108
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
3502
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
4367
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
1898
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
6363
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
1291
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
10748
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
2347
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
7252
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
7432
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
7093
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
7517
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...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
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
4743
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
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.