0

I have a custom control with line shapes on it. This control is in my panel. Whenever I scroll horizontally on the panel, my control's lines flicker very badly. I've been trying to find a solution to this and have looked at many forums and questions by others, but still haven't seen an answer that works for me.

Zach Fry
  • 1
  • 2
  • See: http://stackoverflow.com/a/7569645/495455 and http://stackoverflow.com/questions/818415/how-do-i-double-buffer-a-panel-in-c – Jeremy Thompson Apr 13 '17 at 01:25

1 Answers1

1

I assume this is winforms as you do not have a wpf tag. If so - try this - it may help. This helped with a flickering problem I had.

You can read about it here: http://www.vbmigration.com/detknowledgebase.aspx?Id=692



    Protected Overrides ReadOnly Property CreateParams() As CreateParams
        'this is magic code that has an enormous positive effect on reducing flickering.
        'don't remove this.
        'found this nugget here: http://www.vbmigration.com/detknowledgebase.aspx?Id=692
        Get
            Dim params As CreateParams = MyBase.CreateParams
            params.ExStyle = params.ExStyle Or &H2000000
            Return params
        End Get
    End Property


M. Ferry
  • 147
  • 5