Skip to content

Flickering during selection of <pre> text #271

Open

Description

@ZenithElevate

Is there any way to eliminate the flickering as in the attached video?

video-2026-11-07_16.23.33.mp4

Mind you, this is in an RDP session, but no other Winforms GUI controls exhibit anything such.
DoubleBuffering is enabled.

Activity

  1. eXpl0it3r commented on Nov 9, 2026

    @eXpl0it3r
    Collaborator

    Thanks for the report and the video, that helped a lot! 🙂

    Going frame by frame from around 4s, almost every frame catches the control halfway through a repaint: the background is already cleared, but only the first few lines are drawn. That only happens when the control paints directly to the screen instead of into a back buffer first. HtmlPanel and HtmlLabel both have DoubleBuffered enabled, and WinForms keeps double buffering in RDP sessions too, so I couldn't reproduce it locally. Note that DoubleBuffered on the form doesn't carry over to child controls.

    To narrow it down, can you tell us:

    • which control you use (HtmlPanel, HtmlLabel, or your own control painting with HtmlRender)
    • which .NET version
    • whether the WinForms demo app flickers the same way in that RDP session

    In the mean time, #273 makes selecting a lot cheaper: until now, every mouse move repainted the whole control, even when the selection didn't change, and with <pre> every preserved space is its own word to draw. It should reduce the flicker over RDP, but if the control isn't double buffered, it won't make it go away completely. Let me know how it goes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions