Hi,
Does SetStyle(ControlStyles.DoubleBuffer, true); alleviate the problem?
Also ee can increase the rendering speed dramatically by caching this brush
and painting Form's background ourselves like the following:
Dim backBrush As TextureBrush = Nothing
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) _
Handles MyBase.Load
Dim backImage As Bitmap = Nothing
backImage = Me.Panel1.BackgroundImage
Me.Panel1.BackgroundImage = Nothing
backBrush = New TextureBrush(backImage, Drawing2D.WrapMode.Tile)
End Sub
Private Sub Form1_Closed(ByVal sender As Object, ByVal e As
System.EventArgs)
Handles MyBase.Closed
If Not backBrush Is Nothing Then
backBrush.Dispose()
End If
End Sub
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
If (Not backBrush Is Nothing) Then
e.Graphics.FillRectangle(backBrush, e.ClipRectangle)
End If
End Sub