title: Smooth scrolling FlowLayoutPanel C#
body: <p>Could any one help me solve this problem.
  I have FlowLayoutPanel and in it I have multiple UserControls.
  Have enabled auto scrolling.
  Problem I have is UserControls are flickering/blinking on scrolling. I understand this is because OnPaint event. I have tried folowing code. Have derivated from FlowLayoutControl and trying to override WndProc but without success.</p>
  
  <pre><code>class ScrollFlowLayoutPanel : FlowLayoutPanel
  {
      private const int WM_HSCROLL = 0x114;
      private const int WM_VSCROLL = 0x115;
  
      protected override void WndProc(ref Message m)
      {
          if ((m.Msg == WM_HSCROLL || m.Msg == WM_VSCROLL) &amp;&amp; (((int)m.WParam &amp; 0xFFFF) == 5))
          {   
              // Change SB_THUMBTRACK SB_THUMBPOSITION         
              m.WParam = (IntPtr)(((int)m.WParam &amp; ~0xFFFF) | 4);
          }
  
          base.WndProc (ref m);
      } 
  }
  </code></pre>
  
  <p>Thanks</p>