PC Review


Reply
Thread Tools Rate Thread

CSharp Resize flicker and flashing of WebBrowser TreeView controls

 
 
Ian Stiles
Guest
Posts: n/a
 
      3rd Mar 2004
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.
 
Reply With Quote
 
 
 
 
Michael A. Covington
Guest
Posts: n/a
 
      3rd Mar 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
dontspamme
Guest
Posts: n/a
 
      3rd Mar 2004

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!
 
Reply With Quote
 
Ian Stiles
Guest
Posts: n/a
 
      3rd Mar 2004
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" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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.

 
Reply With Quote
 
Michael A. Covington
Guest
Posts: n/a
 
      4th Mar 2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)>

wrote in message news:<(E-Mail Removed)>...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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.



 
Reply With Quote
 
C# Learner
Guest
Posts: n/a
 
      4th Mar 2004
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...
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WebBrowser control flicker on modal window during resize. Rina Microsoft Dot NET Framework Forms 0 12th Nov 2008 06:33 PM
WebBrowser flicker and Treeview select behavior SirPoonga Microsoft C# .NET 0 21st Feb 2007 09:51 PM
No flicker here, but flicker there. shumaker@cs.fsu.edu Microsoft C# .NET 2 20th Apr 2006 12:34 AM
Flicker Flicker Flicker Michael C Microsoft C# .NET 0 18th Sep 2004 03:45 AM
CSharp Resize flicker and flashing Ian Stiles Microsoft C# .NET 8 4th Mar 2004 06:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:06 AM.