vb Code:
  1. Private Sub From1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
  2.         Dim rec As New Rectangle(Panel2.Left - 1, Panel2.Top - 1, Panel2.Width + 1, Panel2.Height + 1)
  3.         Dim r As New Region(rec)
  4.         Me.DoubleBuffered = True
  5.         Me.Invalidate(rec)
  6.     End Sub

I have used this code as suggested. Not much sure if its correct as i have used the invalidate method first time.

The design of my form is very simple, not many controls in it. The flickering occurs even though the DoubleBuffered is set true.