RichTextBox flickering

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I'm working on a IRC-client written in C#. The progress is steady and the client is soon ready for a public beta release. However, there are some quirks that must first be resolved. One of them being that the textboxes flickers alot

As soon as I do anything to modify text in a RichTextBox in my form the text flickers really bad, it also happens when scrolling

Any thoughts?
 
Hi Macke

Try to add the following to the constructor code:
this.SetStyle(ControlStyles.DoubleBuffer |
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint|ControlStyles.ResizeRedraw,
true);
this.UpdateStyles();

The DoubleBuffer is the one you should keep, the other ones you can remove
if you get bad side-effects.

Good luck,
Peter

macke said:
Hello!

I'm working on a IRC-client written in C#. The progress is steady and the
client is soon ready for a public beta release. However, there are some
quirks that must first be resolved. One of them being that the textboxes
flickers alot.
As soon as I do anything to modify text in a RichTextBox in my form the
text flickers really bad, it also happens when scrolling.
 
I'm sorry, I should have clarified my previous post. I have tried
that, but without success unfortunatly. Nothing seems to happen unless
I set AllPaintingInWmPaint to true in which case the toolbar in my
form turns black, albeit the icons show properly.

The form containing the RichTextBox though (a child form) is still
flickering like crazy. In fact, the whole app seems to flicker a lot
(I have tabs and a statusbar, both which flickers when something
updates, or a resize takes place).

Thanks for the suggestion though! =)

//Macke
 
Back
Top